Expand my Community achievements bar.

Template inheritance

Avatar

Level 8

I have a template for a custom component heroTeaser that I would like to inherit in another custom component called homeHeroTeaser. How do I do it? 

 

In the new custom component I have configured 

sling:resourceSuperType="xxx/components/content/heroTeaser"

 Is the homeHeroTeaser.html required? If not, how does it know it has to call heroTeaser.html?

1 Reply

Avatar

Level 4

It totally depends how you want to inherit.  If you will not create homeHeroTeaser.html then everything will come from parent component and you can override respective file in your custom component . If you will include homeHeroTeaser.html , then only dialog will be inherited and have to include/create other files in your homeHeroTeaser component.