Recommended naming conventions and template storage locations

Abstract

Guidelines for naming templates, fields and field sections as well as how best to store templates.

The following sections describe recommended naming conventions and template storage locations to do with data definition.

When naming templates, fields, and field sections, try to use simple, relevant, and easy-to-understand names.

Tip

Avoid naming conventions that use prefixes or suffixes to indicate types.

Code references fields by name, so you must give fields names that match the corresponding variables or object properties. By default, Sitecore displays the names you provide to both technical and non-technical users. Choose names that business users, such as content authors, will easily understand.

Where display names and field titles are defined, the Sitecore user interface shows display names and field titles rather than actual item names.

Warning

When you name a template field, this name is also written to the search index. Therefore, avoid using generic names, such as Title, in field names. For example, if you create two templates that both have a field called Title, the index considers this to be the same field. This can cause Sitecore severe confusion when searching indexes.

The various types of templates in Sitecore are stored as items under /Sitecore/Templates in the Master database.

Warning

Except for items beneath the Sample and User Defined folders, do not rename, remove, or otherwise modify any of the folders or data templates under the /Sitecore/Templates item.

Create template folders to classify templates by website, function, or other criteria. The following image shows an example of a template folder structure.

Example tree view structure