On any Sitecore project, one of the greatest challenges that architects and developers face is keeping things simple for the Content Author. Today, I will show you how to provide your Content Authors with helpful guidance displayed for each field in the editor, itself, using OOTB features.
Field Label Decorators
Sitecore includes support for adding "help" information to be presented to the Content Author for each field. This help information is displayed in place of or in addition to the field's label (ordinarily, the field's name). I refer these bits of help information as field label decorators.
There are four field label decorators included with Sitecore out of the box:
Decorator |
If set ... |
Best Used When... |
Title |
Displays in place of the field's name, similar to the way an item's Display Name displays instead of the item's Name in the tree |
The field name is formatted or the field was named with developers but not content authors in mind |
Short Description |
Prefixed with " - " and appended to the end of the field label |
Useful for providing a quick-reference to explain field requirements/validation, how the data in the field will be used, or listing out replacement tokens that the Content Author may use in the field's content |
Long Description |
Displays as hover text when the Content Author's cursor hovers over the field label |
Useful for providing a detailed reference/description of the functionality, purpose, format, structure, etc. of the field |
Help Link |
Turns the field label into a clickable link |
Useful for linking to web-based documentation, executing a small JavaScript snippet, or providing a shortcut for sending an email to a support team |
Walkthrough
To begin, create a new template and add a field section with an arbitrary name to it. Then, add the field "FeaturedArticles" to the new field section.
Next, navigate to the Template Field item for the new field and enter "Featured Publications" as the Title of the new field.
Next, scroll down the page and expand the Help section of the Template Field item. Once there, fill in the value for the Help link, the Long description and the Short description field label decorators.
Finally, create a new Content Item that inherits the new template.
Resulting Field Label without Hover
Resulting Field Label with Hover
Visual Breakdown
In the below image, each of the Field Label Decorators have been identified by name and example:
Additional References