How to implement complex inheritance ?
- July 23, 2016
- 4 replies
- 3447 views
Hello All,
We have the below attached site structure.
Industry Page and its child pages:-
Industry and its child pages are created using industry template pointing to industry page rendering component. Industry page rendering component is included certain content components( say 4 components) in it.
Region Page and its child pages:-
Region and its child pages are created using region template pointing to region page rendering component. Region page rendering component is included certain content components( say 5 components) in it.
In the above 2 sub trees ( industry and region pages) out of the components included, few are common to both sub trees( say 3 components). So in industry sub tree we have 1 additional component which is not present in region and region sub tree has 2 additional components which are not present in industry.
The common components (3 components) in both sub trees, render content specif to the sub tree where they are included. For example in region sub tree, they render content specific to that region, where as in industry sub tree, they render content specific to industry based on tags.
Our requirement:-
Our requirement is, we should have a parent page (like Site page in the above diagram) for the above 2 sub trees, where authors drag and drop a component, author the content and tag it to specific sub tree ( for example region), then the content should render only in the sub tree it tagged along with the other components present in their page rendering component of that sub tree.
Our Approach:-
Created a parent page with generic template and generic page rendering component. generic page rendering component has an iparsys included in it. Where authors drag and drop a component, author the content and tag it to specific sub tree. Region and industry page rendering components have sling resource super type as generic page rendering component.
Problem Facing:-
Even though region and and industry page rendering components has sling resource super type as generic page rendering component and an iparsys is used in the generic page rendering component to drag and drop a component, author content and tag it to specific sub tree. The authored content in parent page is not inherited to child pages ( sub tree pages).
It is not inherited because the parent page is created using a generic template, where as sub tree pages are created using a different templates.
If content is inherited to child sub trees, then we will override the iparsys component whether to inherit content or not using tags.
Could you please us with an approach to solve the requirement we have.
thanks in advance
Regards