How can I use tokens in node-pages in Drupal?
I know that tokens (token module) can be used to fill in tokens.
But for my articles (of node type page) 开发者_JS百科how can I use tokens so that my site's name etc. can replaced automatically?
Check out the Token Filter module. It will allow you to use tokens within your node body field.
From the module page:
In the text where you use that input filter you can use substitution tokens with [token global site-name] etc. You can use the global context, the user context and any custom context available. You need to enable the Token Filter for any of your existing filter types first.
For instructions on using this module, see the README.txt
Drupal 7
Install and enable Token Filter module and enable 'Replace tokens' filter e.g. for Full HTML text format.
For testing may edit any node and just type [site:name] to see if that works.
For Help, as admin go to Help->Token and you will find all the tokens you can use (/admin/help/token).
精彩评论