DEV Community

Daniel Gomez
Daniel Gomez

Posted on

2 1

Sitecore Tokens for Standard Values

As Sitecore developers, when we're creating templates, a good practice is to add Standard Values so that fields can have default values, or sample values.

For this purpose, we can use Sitecore Tokens, this will allow us to dynamically add values to fields, according to the item that is being created by the Content Author.

Tokens:

These are the tokens that we can use:

Token Utility
$name The name of the item.
$id The ID of the item.
$parentid The ID of the parent of the item.
$parentname The name of the parent of the item.
$date The system date (yyyyMMdd).
$time The system time (HHmmss).
$now The system date and time (yyyyMMddTHHmmss).

Example:

Below we can see an example with the $name token. In this example, we have a field with the name Heading, and at the time of creating a new item, this field will take the name of the item.

Thanks for reading!

Now you know how to dynamically add values to your Standard Values and the different tokens you can use in a general way.

If you have any questions or ideas in mind, it will be a pleasure to be able to be in communication with you, and together exchange knowledge with each other.

See you on Twitter / esDanielGomez.com.

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read more →

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more