Surendra Sharma

Surendra Sharma

Search This Blog

Monday, October 27, 2014

How to inherit templates in Sitecore

During working with templates in Sitecore, there are situations when you want to implement inheritance mechanism. So here is simple way to do it.

Suppose we want to create “Slide” template having header and footer. In programming terms every Slide should get inherit from Header and Footer. So we will create two template like “Header” and “Footer” as below







After header and footer, we will create “Slide” template as below




As every slide contains header and footer, so let’s assign “Header” and “Footer” template.
Select “Slide” template -> Click on Content tab -> Assign “Header” and “Footer” template from “__Base Template” fields as below



You can verify this association from “Inheritance” Tab of “Slide” Template as below



Now whenever you will create content item of “Slide” template, you will get fields with sections of Footer, Header and Slide and as below






Please leave your comments or share this technique if it’s useful for you.

No comments:

Post a Comment