Using the Sitecore Template Standard Values

Using the Template Standard Values (TSV) in Sitecore is common practice. Once you add the _Standard Values to a data template you can place default values or tokens in the fields on the TSV. The values will be used, or a value will replace the token, when a new content item is created from the data template.

But did you know this behavior goes deeper than just the fields you created on the data template? You can apply Presentation Details to the TSV and they will be applied to the presentation when an item is created from the data template. Or, you can set values on even deeper fields. Remember, Sitecore is built to inherit from very basic elements into the more complex elements. Therefore, functionality that seems to exist at a higher level may actually go deep into Sitecore root elements.

Take for instance a field created using the General Link field. Let’s say you want to create a Link component that may be added as an individual component on a page. So we create a Link data template, add a General Link field and name it Destination.  I added a Multi-Line Text field named Description as another example of _Standard Values. Generate the Template Standard Values

UsingSitecoreTSVs_1

Then we update the TSV values on the data template as we usually do.

UsingSitecoreTSVs_2

But we can dive in a little deeper and set standard values on the General Link field itself. Click on the “Insert link” and you can set standard values on the General Link properties for an internal link.

UsingSitecoreTSVs_3

And the beautiful thing about this is that whatever fields you set values on for one type of link, gets transferred to the same fields on other link types. For instance the values on the “Insert link” above are also set on the “Insert external link” below. The same is true for “Insert media link” and “Insert JavaScript”.

UsingSitecoreTSVs_4

When the new link is created in the content tree, the TSVs are included and the tokens contain their respective values.

UsingSitecoreTSVs_5

So, what you should take away from this is that Template Standard Values run deep and you should attempt to set as much as you can at the template level. This will provide a standard across your entire website when new content items are created.

Using the Sitecore Template Standard Values

Leave a Reply

Your email address will not be published. Required fields are marked *