Custom token replacement in Drupal 7

If you need to replace custom tokens in the body or any other node field in Drupal 7, you can use the modules Token Filter and Custom Tokens to do the job.

Install and enable both modules, then enable the Replace Tokens filter in the desired input format. This is under Configuration / Input Formats.

To add the custom tokens, go to Structure / Custom tokens. If you create a token named Foobar, the custom token will be something like [custom:foobar].

Leave a Reply

Your email address will not be published.


9 − six =

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>