Create and insert a content token

Current version: 10.2

Content tokens let you reuse lines of text and/or numbers. This can be convenient when, for example, you want to reuse prices, copyright notices, version numbers, or embedded videos.

Create a content token

To create a content token:

  1. In the Content Editor, navigate to <tenant>/<site>/Data, right-click Content Tokens, click Insert, and click Content token.

  2. Enter a name, for example, Copyright, and click OK.

  3. In the Properties section, in the Value field, enter the value. For example, enter: Copyright © 1999-2019 Sitecore.

Insert a content token

You can use content tokens in single-line text, multiline text, and rich text field types.

To insert a content token in the Rich Text Editor:

  1. In the Rich Text Editor dialog box, click Insert Variable.

  2. In the Insert ContentToken dialog box, click the token that you want to insert and click Insert.

    Content tokens are expanded only in Preview mode and Live mode. During editing, the content token is displayed with its name only, so that it is clear that it is a token and that you can edit it.

    Insert a token

If you want to reference a content token in a field, use the $ key and the name of the content token in parentheses. For example, to add a content token to the caption of an image:

A content token for the image caption
Content token displayed

Do you have some feedback for us?

If you have suggestions for improving this article,