Inheritance in AEM Editable Templates | AEM Community Blog Seeding | Community
Skip to main content
kautuk_sahni
Community Manager
Community Manager
February 15, 2021

Inheritance in AEM Editable Templates | AEM Community Blog Seeding

  • February 15, 2021
  • 0 replies
  • 1432 views

BlogImage.jpg

Inheritance in AEM Editable Templates by Singaiah Chintalapudi

Abstract

Overview
This article describes how inheritance can be achieved in the Adobe Experience Manager (AEM) editable templates with minimum customizations.

Prerequisites
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)

Problem
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.

Solution
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.

Read Full Blog

Inheritance in AEM Editable Templates

Q&A

Please use this thread to ask the related questions.

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