Template inheritance | Community
Skip to main content
May 18, 2022

Template inheritance

  • May 18, 2022
  • 1 reply
  • 684 views

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?

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

1 reply

May 18, 2022

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.