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.
- Click the name of the content type that you want to modify. Be sure that content type contains a field that allows the use of tokens, which usually includes the Body field (for example, the Blog entry content type).
- Find the field to which you want to add tokens (in this example, the Body field), and then select the text format that you configured to replace tokens (for example, Full HTML from the previous section).
- 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.