Sitecore Tokens
Mohamed Sirajudeen
Senior Sitecore Consultant at INSCALE |??Sitecore Technology MVP 2024 |??4x Sitecore? Certified |??Digital Transformation Enthusiast |??Digital Technology Analyst |???Blogger |???Speaker
In Sitecore, we might have noticed that some string starts with $ symbol (for example : $name) mainly in standard values (_Standard Values) in template. If we create an item by using the same template, again we might have noticed that particular field gets replaced with some readable name (ie; name of the item).
Yes, this is kind of magic comes from the $name which is known as Tokens in sitecore. It is the way to assign the values dynamically during the item creation.
Similarly, Sitecore has come up with some built in tokens that can be used for dynamically resolving range of different things like below :
$name - The name of the item
$id - ID of the item
$parentid - The ID of the item's parent
$parentname - The name of the item's parent
$date - The current date
$time - The current time
$now - the current date and time
Using tokens to dynamically resolve field values during item creation has a lot of benefits. For example, if you want to create an item and have a certain field to always be set to the current date, this can be achieved by using the?$date?token.
Like above image, $name would be converted as a Item name when the user created Item by using the template. This is how we can use different tokens as per the need.
This is the end of Sitecore Tokens Article.