It’s been a while since my last blog post, that’s because I’ve been working hard on a sitecore extension. I’m in the process of working out the last bugs but here’s a preview of what it will be capable of.
Where is it used?
It is found in the Telerik editor from a rich text field.
what is a token?
A token is a small chunk of text that is dynamically replaced with something else when the rich text field is rendered.
Why use tokens?
The most basic of uses is to use tokens to store common information that will change at the same time on every page, such as a customer service phone number, or address. However I’ve devised several more use cases that the TokenManager will be able to accomplish
- These tokens are defined and rendered using a code snippet
- Good for easily calculated values, such as the current date or a visitor count
- Also good for session data, such as current user’s name “Welcome back Jeff, we have some great deals for you!”
Shared link tokens
- These tokens have a link defined that they proxy the user to
- Good if you have external links that you need to maintain that may change
- These tokens execute a rules field to find their value
- Brush up on your rules engine while you’re here
- Good if you want to personalize a single word or sentance in a paragraph instead of the entire paragraph
- These tokens invoke a sitecore rendering and inject it into the rich text field
- Good if you want to add something more than an image into a rich text field, such as a video
What does it look like
How is it managed
Each token collection must have a representation in Sitecore underneath a token collection folder. Both the token collection folder and the token collection have options to filter out where the contained tokens are usable. Say for example you have a multisite sitecore environment and you want tokens specific to each site, you can accomplish this by defining filters on either the token collection folder or token collection items.
There is a management tool to track tokens
Each usage of this token is listed. you are also given an option to edit the item, which opens up the content editor in a Lightbox at that item
There are additional features in other tabs in the token manager tool, i’ll get into those in other blogs.
I’m in the final testing and bug fixing step of development, you can look for both the open source code as well as the sitecore module package to be available soon.
I’ll leave you with this.