Personalization Token

This project is not covered by Drupal’s security advisory policy.

The Personalization Token module provides a simple UI for content creators to create new tokens based on user account values. An included CKEditor plugin submodule allows personalization tokens to be easily inserted into content. In this way, you can now personalize content to your logged in users!

For example:
If you have added a "first name" field to the user account, a Personalization Token can be created to render the field value or a defined fallback. Once created, you can use the standard token format (i.e. [personalization:first_name]) anywhere tokens are normally allowed. The rendered result will be the user entered field value (i.e. "John") or, if the field is empty, the fallback will be used (i.e. "there").

Requirements

Base module:

CKEditor plugin submodule:

Installation and configuration

Base module:

  1. Install the module.
  2. Once installed, a new menu item is available via "Admin > Content authoring > Personalization tokens". Create and manage your personalization tokens here.
  3. An "Administer personalization tokens" permission, accessed through the regular Drupal permissions page, can be further configured to control who can manage tokens.

CKEditor plugin submodule:

  1. Download the Token Replacement CKEditor Plugin library and place in "webroot/libraries/token-replacement-ckeditor-plugin". See the module's README.md for additional instructions.
  2. Install the module.
  3. Once installed, go to "Admin > Configuration > Content authoring > Text formats and editors" and cofigure the editor(s) that you would like the plugin available within.
  4. Drag the Personalization Token icon (CKEditor icon) into the active toolbar area.
  5. Under 'Enabled filters', check "Replaces global and entity tokens with
    their values".
  6. Under "Filter processing order", optionally change filter ordering.
  7. Under "Filter settings", optionally check "Replace empty values".

FAQ

See the base module and submodule README.md files for FAQs and additional information.

Supporting organizations: 
Initial build and maintenance

Project information

Releases