Advertising sustains the DA. Ads are hidden for members. Join today

Instructions

Last updated on
21 March 2017

Usage

When you install the module, it will create some example tokens, that you can see under /admin/help/token
At the moment, there is no UI to manage the custom tokens, but we will prioritise it. We have started Config Token UI module.

If you want to add your custom tokens, the easiest way of doing it is by exporting (/admin/config/development/configuration/single/export)
config_token.settings.yml and copying it to your sync directory. Then you can make the edits and commit the file.

To export the values for the custom tokens, create config_token.tokens.yml.

Working with Domain Access module

All you need to do to override the custom token configuration per domain is to create a config file with this pattern:
domain.config.[domain alias].config_token.tokens.yml

See https://www.drupal.org/project/domain

Working with Token Filter

You can use Token filter module to render tokens on the fields.

See https://www.drupal.org/project/token_filter

Similar modules

Token Custom: The difference is the storage. Token custom has a custom table to store configuration, which means, if we want to deploy custom tokens programatically, we need to insert rows into the table, whereas Config Token allows you to export and import using Configuration manager.

See https://www.drupal.org/project/token_custom

Help improve this page

Page status: No known problems

You can: