This module allows you to create custom tokens for use in Drupal. It provides a flexible way to define replacement text for various scenarios, enhancing the functionality of other modules that use the token system. The latest versions offer improved security and configuration options for defining custom tokens.
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)
Depends on
Dependencies of the latest stable release
- Token
- filter Drupal core
- text Drupal core
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
Activity
Release Timeline
Releases
| Version | Type | Core | Notes | Release date | |
|---|---|---|---|---|---|
| 8.x-1.0 | Stable | 10–11 | Sep 30, 2025 | ||
| 8.x-1.0-beta2 | Pre-release | 10–11 | Feb 25, 2025 | ||
| 8.x-1.0-beta1 | Pre-release | 10–11 | Feb 4, 2025 | ||
| 8.x-1.0-alpha5 | Pre-release | 10–11 | Dec 15, 2024 |