Create and insert a content token
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:
-
In the Content Editor, navigate to
<tenant>/<site>/Data
, right-click Content Tokens, click Insert, and click Content token. -
Enter a name, for example, Copyright, and click OK.
-
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:
-
In the Rich Text Editor dialog box, click Insert Variable.
-
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.
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: