the goal is to create a template with two tabs in the page properties and then create two template children of which one inherits both tabs, while the other child only inherits one tab. Possibly from code. I don't have the slightest idea how to do it, I can't find any resources that can help me do it from start to finish.
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi @Vodjakxa
Lets consider we have a Home page and a Contact page.
1. I believe what you can try to do is to create two editable templates first. Let's say template-home and template-contact.
2. Once the templates are in place and working, you can try to extend the ootb page.
3. Then create two structures that extend the custom page you just created. Let's call them page-home and page-contact
4. Then create two structures, one for each tab. Lets call them tab-common and tab-specific.
Your pages and structures will look something like:
Note: Please ignore their location. There are better practices about how to store them (organized in better folders, add versions, maybe in different project the ui.apps etc)
5. In each of the page structures include the tabs that you need:
6. Tabs structures can contain whatever elements you need. For this example I simply added two text fields :
7. Then final step is to go in the template definitions and refer the two new page structures you just created: page-home and page-contact
Please be aware that I have not tested this on my local. I just quickly sketched it on paper, just to underline the concept. I hope I haven't omitted anything.
Hi @Vodjakxa
Lets consider we have a Home page and a Contact page.
1. I believe what you can try to do is to create two editable templates first. Let's say template-home and template-contact.
2. Once the templates are in place and working, you can try to extend the ootb page.
3. Then create two structures that extend the custom page you just created. Let's call them page-home and page-contact
4. Then create two structures, one for each tab. Lets call them tab-common and tab-specific.
Your pages and structures will look something like:
Note: Please ignore their location. There are better practices about how to store them (organized in better folders, add versions, maybe in different project the ui.apps etc)
5. In each of the page structures include the tabs that you need:
6. Tabs structures can contain whatever elements you need. For this example I simply added two text fields :
7. Then final step is to go in the template definitions and refer the two new page structures you just created: page-home and page-contact
Please be aware that I have not tested this on my local. I just quickly sketched it on paper, just to underline the concept. I hope I haven't omitted anything.
AEM does not support Template Inheritance.
You would need to visit your use-case from perspective of Component Inheritance.
Things to consider:
@Tethich has put in a lot of effort in presenting the details with screenshots. Thank you !
@Vodjakxa As @aanchal-sikka and @Tethich mentioned you will have to create two separate templates . You can use the concept of Sling Resource Merger to show and hide what fields you need from the parent template.