Load tokens in dialog

Created on 28 August 2019, almost 6 years ago
Updated 19 January 2025, 6 months ago

The preferred way of including tokens on page is using modal as some sites have tons of tokens. This can make the /node/add/dir-listing page really slow, in our case the tokens can't even load because there are so many languages and node types.

Quote from Token docs https://www.drupal.org/documentation/modules/token:

The preferred method for displaying the token browsing UI is via the theme_token_tree_link() function provided by the token module. Using this method will place a link on the page that when clicked will open a modal window displaying a tree like interface for browsing available tokens. This method is preferred because the list of tokens can get quite large and displaying the entire token tree and the JavaScript required to provide the collapsible interface can slow down loading of pages. Since the token tree is likely not used the majority of time we prefer to defer loading until someone clicks the links requesting the list of tokens and then load it via and ajax call.

Feature request
Status

Closed: outdated

Version

4.0

Component

Administrative Interface

Created by

🇪🇪Estonia hkirsman

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024