Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

how to inherit base template to another template.

amangoyal15
Level 3
Level 3

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.

1 Accepted Solution
Lokesh_Shivalingaiah
Correct answer by
Community Advisor
Community Advisor

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 !

View solution in original post

3 Replies
Lokesh_Shivalingaiah
Correct answer by
Community Advisor
Community Advisor

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 !

View solution in original post

smacdonald2008
Level 10
Level 10

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
Level 3

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.