Add tokens to any content to make the content more dynamic. When content containing a token is displayed, the token is replaced by text that can be calculated at that moment, based on information that includes the current date, site details, and more. For example, you could insert the token
[site:mail] in a blog post and when the blog post is displayed, the administrative email address for the website appears in the blog post.
When you enter data to a field with a formatting toolbar, you can select from any of the available text formats for its content. The text format you choose specifies how to display your content, including whether or not to replace any tokens you enter with their associated value.
To configure a text format to enable tokens:
- Go to Configuration > Text formats, and click the configure link for the text format that you want to modify (for example, Full HTML).
- In the Enabled filters section, select the Replace tokens check box.
- Click Save configuration.
You can now use tokens with fields that use a configured text format.
Adding tokens to fields
After you modify one or more text formats to replace the tokens you enter with their values, you can use tokens with your content.
To add a token to a field:
- In the admin menu, click Content, and then click the Add content link.
- In the Body field, select a content type, such as Basic page.
- Select a text format that you've configured to replace tokens. In the example above, it was Full HTML.
- Add tokens to the field and they will be replaced with the token values.
For a list of available tokens, click the More information about text formats link.