Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Usage Milestone: Google Analytics Module google_analytics crossed 1,000 active installs. Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Release: GraphQL Compose Codegen 1.1.2 Minor update available for module graphql_compose_codegen (1.1.2). Release: Mapy.com 1.1.3 Minor update available for module mapycom (1.1.3). Release: Ckeditor5 entity browser 3.0.3 Minor update available for module ckeditor5_entity_browser (3.0.3). Release: Ckeditor5 entity browser 3.0.1 Minor update available for module ckeditor5_entity_browser (3.0.1). Release: Ckeditor5 entity browser 3.0.2 Minor update available for module ckeditor5_entity_browser (3.0.2). Release: Teamleader Integration 4.0.2 Minor update available for module teamleader (4.0.2). Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Custom Tokens

5,774 sites Security covered Drupal 10–11 Token ecosystem
View on drupal.org

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

  • Build tokens using input filters (#1336622)
  • Define custom token types (#1341106)

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

Token

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)

Infomagnet

Sponsored by (versions 8.x)

Drupal Geeks
DROWL.de

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

Tracked releases
4
Tracked since
Dec 2024
Latest release
11 months ago
Releases (12 mo)
1 ▼ from 3
Maintenance
Slowing

Release Timeline

Releases

Version Type Core 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