Basics of Templates Creation in Sitecore

In general, templates basically should be defined under below categories at least. Templates are the most basic thing which is defined at the initial stage in Sitecore.

In general, templates basically should be defined under below categories at least.

  • Base templates
  • Data templates
  • Rendering parameter templates
  • Site configuration or settings templates
  • Page templates

Base templates as the name signifies that it should consists of the fields which is likely to be the part of most of the templates. For example- Title, Image and description and link fields. These fields can be part of many templates so instead of duplicating the same fields in all templates create it as a base template and inherit it.

Data templates are basically the Entities in the system. As we define entities in our code same way you can create Data templates and its fields. For example Product template in a ecommerce application.

Rendering parameter templates should be defined in a different folder and with rendering name as prefix so that one can get information of all the renderings for which rendering parameters exist.

Site configuration templates should be created in order to configure settings for Site specific data which is common on all pages. For example: enabling or disabling Banner and popups on the Site pages.

Page templates are the templates which might be inheriting data templates. Basically, these are the templates which will contain presentation (means renderings, placeholder and layouts) and are created based on number of website unique pages. For example: Page template might inherit Data templates, meta data templates.