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:
- User module (part of core Drupal 8)
- Token module
CKEditor plugin submodule:
- CKEditor module (part of core Drupal 8)
- Token Filter module
- Token Replacement CKEditor Plugin library
Installation and configuration
Base module:
- Install the module.
- Once installed, a new menu item is available via "Admin > Content authoring > Personalization tokens". Create and manage your personalization tokens here.
- 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:
- 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.
- Install the module.
- 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.
- Drag the Personalization Token icon () into the active toolbar area.
- Under 'Enabled filters', check "Replaces global and entity tokens with
their values". - Under "Filter processing order", optionally change filter ordering.
- Under "Filter settings", optionally check "Replace empty values".
FAQ
See the base module and submodule README.md files for FAQs and additional information.
Project information
- Seeking new maintainer
The current maintainers are looking for new people to take ownership. - Module categories: Content Editing Experience, Access Control, Developer Tools
- Ecosystem: Token, Token Filter, CKEditor 4 - WYSIWYG HTML editor
- 6 sites report using this module
- Created by Hubbs on , updated
- This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.