Best Practices for Building Templates in Sitecore

Feb 10, 2015
Prasanth Nittala
Sitecore is a robust content management platform that powers thousands of websites globally. With such a dynamic platform, it’s important to make sure that your Sitecore site is built out following best practices. 

We’ll be releasing our next installment of our Sitecore Best Practices white paper later this month, but in the meantime, here’s a sneak peek at some of our Sitecore Template Best Practices:

Best Practice #1 


Choose template names that are understood by business users. Display Name and Field Titles are the most important template names in Sitecore.

Why is this a best practice? 


Improves ease of use for content editors

Impact on your Sitecore site:


Content editor experience 

----------------

Best Practice #2


Avoid circular inheritance in templates - this means: C inherits B, B inherits A, A inherits C.

Why is this a best practice?


A circular reference is cause for infinite recursion.

Impact on your Sitecore site:


Implementation

-------------------------

Best Practice #3


Use caution when using a tilde (~) character in the source for image fields as this will allow the user to access the entire media library tree.

Why is this a best practice?


Restricting the use of (~) and assigning a specific folder for asset elements makes it easier for content editors to upload to the respective directory, rather than being confused with the option of selecting the folder to upload to.

Impact on your Sitecore site:


Security and content editor experience