how to inherit base template to another template. | Community
Skip to main content
amangoyal15
Level 3
October 12, 2016
Solved

how to inherit base template to another template.

  • October 12, 2016
  • 3 replies
  • 1918 views

Suppose i have two templates 'HomePage' & 'SectionPage'. Now in these templates i want to inherit my base template and this base template  refers to a base component containing iparsys. My requirement is i want to drag header component in iparsys of the base template page and these changes in base template should reflect in  'HomePage' & 'SectionPage' templates.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Lokesh_Shivalingaiah

Thats the basic and normal template design we should do..

Create a 'base template' using 'base page component' inheriting the libs sightly page component.Override all the htmls like header.htlm, footer.html, body.html etc which you would like to override.

Now, once you have defined your base page component. create homepage and section page component with the resourceType of base page. Automatically all the htmls from the base page component would be available. Now dont override header.html in your case and override only body.html or content.html in the homepage and sectionpage.

Hope I am clear !

3 replies

Lokesh_Shivalingaiah
Lokesh_ShivalingaiahAccepted solution
Level 10
October 12, 2016

Thats the basic and normal template design we should do..

Create a 'base template' using 'base page component' inheriting the libs sightly page component.Override all the htmls like header.htlm, footer.html, body.html etc which you would like to override.

Now, once you have defined your base page component. create homepage and section page component with the resourceType of base page. Automatically all the htmls from the base page component would be available. Now dont override header.html in your case and override only body.html or content.html in the homepage and sectionpage.

Hope I am clear !

smacdonald2008
Level 10
October 12, 2016

It sounds like you want to have a named iparsys on the homepage, and then an iparsys w the same name on the sub-pages (section pages), and the iparsys will inherit down the tree. (section pages will show whats in the homepage) –this is simply how the iparsys works, and you doesn’t have to do anything special. The original geometrixx sidebar follows this paradigm.

amangoyal15
Level 3
October 13, 2016

what i inferred from you , that i tried but when i drag image component in page referring to base template , it is not reflecting in page of homepage template and section page template.