1

How can we create custom token in Sitecore to rename the fields of the template items at the time of item creation ?

I want my fields to be renamed similar to general link fields present on the template. Example - If I have general link field named Learn more and I want to create a token which will rename the field as LearnMoreGTM link.

I want to do it for at least 4 fields as its the maximum number of general link field we have in our project. Any thoughts ?

2
  • Sitecore tokens are used to supply value in a field at the time of an item creation. It shall not be used to name the template fields. Template items are not created as often as content items, so they can be named manually the way you want.
    – Ghanendra
    Sep 12 at 16:04
  • Templates are the Data Structure in the Sitecore and fields are their properties. You can't change anything in the template. Tokens are used for assigning the value to the fields at the time of item creation.
    – Sumit S
    Sep 13 at 12:57

1 Answer 1

2

Sitecore tokens are used to populate field value and not field names. You should define field names before creating items from it and use sections to keep related fields together.

Fields are like properties in a template, you can't make it dynamic. It is not at all advisable to change field names at the time of item creation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.