Part of the Token ecosystem · 21 projects
This module offers an alternative way to browse all available tokens on your Drupal site using HTMX. It allows you to view deeply nested tokens without encountering recursion limits that could crash your site. Developers can also integrate this token browsing functionality into their own forms.
Provides an alternative Token browser element using HTMX for requests. Browse all tokens available on your site with no depth limitations.
Features
- Browse deep nested tokens beyond the default recursion depth limit without crashing your site.
- Visit the help page on your site at
/admin/help/token_browserto see all available tokens. - For Developers: Provides an alternative theme function to attach token browser functionality to form fields.
Replace'#theme' => 'token_tree_link'
With'#theme' => 'token_browser_link'
Example:$form['tokens'] = [ '#theme' => 'token_browser_link', '#token_types' => ['node', 'user'], '#global_types' => TRUE, ]; -
As of version 1.0.1, administrators can globally alter the theme registry for every existing
token_tree_linkto automatically use this token browser. The settings form is available at/admin/config/user-interface/token-browser - As of version 1.0.2, administrators can set the size of the token browser modal when enabled globally.
Quick Start
To use this token browser everywhere on your site, do the following:
- Navigate to the settings form at
/admin/config/user-interface/token-browser. - Check the box Replace Token module's default browser sitewide (enabled by default).
- Check the box Force recursion limit. This is recommended.
- Optionally override Dialog options (defaults: Width = 800, Height = 500).
- Click Save configuration button.
- Anywhere you see a Browse available tokens link will now point to the Token browser route.
Similar projects
Fast Token Browser
This was a Drupal 7 module that never got ported but claims to achieve the same objective using ajax. My module uses the new HTMX library in Drupal core and completely eliminate the need for any Jquery.
Ask your assistant about Token Browser
Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works
Depends on
Dependencies of the latest stable release
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
More in the Token ecosystem
Most installed first