Custom Tokens (original) (raw)
It gives the user the ability to create custom tokens for specific replacements that can improve other modules relying on the Drupal 7 token API or, for Drupal 6, the Token module.
Versions 7.x-1.x and previous relied on PHP evaluation to build custom tokens.
The new 7.x-2.x relies on input filters. While still allowing for PHP tokens through the D7 core PHP filter module, administrators can permit only HTML or plain text custom tokens.
New features in version 7.x-2.0
Versions 7.x-1.x and previous
They are designed for developers with, at least, a little PHP knowledge. Custom tokens will evaluate and execute PHP snippets in order to provide the replacements for the tokens you define.
Version 8.x-1.x
For security, PHP snippets are not supported.
Related modules
Dependencies
Alternative modules
- The Parameters module makes parameters available as tokens and are completely configuration-based (exportable / importable through configuration). Major difference that a parameter token always starts with [parameter:*] whereas this module allows specifying a token type on root level.
Sponsored by (versions 5.x and 6.x)
Sponsored by (versions 8.x)
Supporting organizations:
They helped by running code sprint
Sponsored the refactor of D8 version as a content entity
Ongoing support for Drupal 9/10
proudly helps to maintain this module for the Drupal community
Project information
Releases
8.x-1.0 released 30 September 2025
Works with Drupal: ^10.3 || ^11
Development version: 8.x-1.x-dev updated 16 Jan 2026 at 12:55 UTC