How to Embed Variable in Content in Drupal

Tokens are small pieces of text that can be put into large documents or other content through simple placeholders such as "%site-name" or "[user]". The token module offers a central API for modules to embed these tokens and expose their own token values. The token module doesn't provide any visible functions to users, just token handling services for other modules. Token insert module enables you to insert tokens into a text area in your Drupal content page. It supports both plain text and WYSIWYG text area.

Things You'll Need

  • Token module
  • Token insert module
Show More

Instructions

    • 1

      Download and install the Token module and Token insert module from the Drupal website. Unzip the module files. Go to "sites/all/modules" and drop these two module files. Log into your Drupal site backend and enable these two modules by ticking them. Click "Save configuration."

    • 2

      Click "Create content" and select "Article" to create a new content page. Enter a title for the content page. In the "Body" section, type some text such as "Demo token insert in a content page." Choose a token from the token list under "Insert token" text. Click "Insert" to insert the token to the content page. Click "Save."

    • 3

      Click "Administer" and "Content" to view your content page token. You can see the token is inserted in the text field.

Related Searches:

References

Resources

Comments

Related Ads

Featured