Introducing Content Author Tokens for Sitecore


Brandon Bruno


September 10, 2018


Introducing Content Author Tokens for Sitecore

Introducing my second Sitecore module of 2018 - Content Author Tokens for Sitecore (CATS).

CATS provides token-based content replacement to Sitecore. Content authors can create and manage tokens in the Content Editor and utilize them in a variety of common fields.

A few of the core design principles behind CATS: tokens should be easy to manage by content authors, tokens should be usable in as many content fields as possible, and tokens should not impact page render time.

An example token. "Pattern" is the token authors will use in their content. "Output" is the content that will be rendered.

There are already a couple of proven token solutions, each with their own strengths and weaknessess:

  • Token Replacement by Derek Hunziker. By using customized Sitecore links, tokens can be tracked using the Links Database. This ensures tokens can be quickly and easily referenced using already existing Sitecore Client tools. One downside: this requires a custom link provider to render tokens, which skews the responsibilities of the LinkManager class in Sitecore.
  • Token Manager by Jeff Darchuck. This excellent module provides extensive customization options and a robust token management experience for content authers and developers alike. One downside: while tokens are easy for content authors to use, they are only usable in rich-text fields.

Rather than use a custom format or specialized processor, CATS tokens are simple text strings. This means that tracking tokens across items involves using content search rather than the Links Database.

On the plus side, the text-only nature of CATS - along with a custom CD server cache - means that rendering speeds are fast, adding very little to page render time. CATS provides all the tools necessary to automatically and manually manage token cache.

Finally, tokens are available on many common Sitecore fields. For version 1.0.0, those fields include:

  • Single-Line Text
  • Text
  • Rich-Text
  • Image (including any attributes, such as 'alt' or 'data')
  • General Link (including any attributes, such as 'href' or 'title')

This list will grow with future versions of CATS, but for the timing being, can be updated now by forking the repo on GitHub (see below).

More Info & Download

More information: CATS

Direct download of CATS module:

The module is pending review in the Sitecore Marketplace and will be published within a week or two.

Source Code

Full source code for CATS is available on GitHub. Pull requests are welcomed.

GitHub: Content Author Tokens for Sitecore (CATS)

Do you have questions, comments, or corrections for this post? Find me on Twitter: @BrandonMBruno