Token Replacement
Last updated on
15 May 2018
Template Whisperer expose three main Token:
suggestion-lookupsuggestion-
entity
Token is commonly used with Pathauto to allow some page's URL to be generated using a Template Whisperer Suggestion URL as prefix. For example, you have a Basic Page "Projects" containing the Template Whisperer Suggestion "projects_collection". Then you want every of your Project nodes to use the URL of your Basic Page "Projects" suffixed by the Project title page. If Projects is a bsic
Example:
| Node | Type | Url |
| About Us | Node - Basic Page | /about-us |
| Projects | Node - Basic Page | /projects |
| My Awesome Project | Node - Project | /projects/ma-awesome-project |
With the Token integration it's quite easy ! You just need to define a new Pathauto patterns using the suggestion-lookup token.
/[suggestion:lookup:projects_collection:entity:url:path]/[node:title]
Help improve this page
Page status: No known problems
You can:
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion