This article describes how inheritance can be achieved in the Adobe Experience Manager (AEM) editable templates with minimum customizations.
AEM Server (author server) with core components
Latest AEM server (this is validated on AEM 6.5 but can be implemented on older or cloud versions)
In legacy CQ/AEM versions, inheritance in AEM works through iParsys. However, this is deprecated in the latest AEM versions and editable templates. It is best to use Experience Fragments (EFs) for inheritance or for re-usable content where is possible. Still, there are few business use cases which requires a customization to achieve the inheritance.
One of them is: Authors requires a in-page authoring and child pages should inherit that content.
The approach to achieve the inheritance without using inheritance or EFs is:
1. Provide an authoring field to configure the root path at a parent page or a specific page
2. Develop a new component for authors select which component they want to inherit
3. If authors want to break the inheritance and inherit from another child page vs parent page then they just need to re-author the root path again at the sub-level page and all other child pages inherits the configure component content.
List of Code Changes:
1. Injecting a new tab with a pathbrowser field to select the resource which will have all the content i.e. select the parsys node if you want to inherit the components authored inside that parsys: https://github.com/singaiahc/editable-templates-inheritance/blob/master/ui.apps/src/main/content/jcr_root/apps/editableTemplateInheritance/components/page/_cq_dialog/.content.xml.