Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

How do we maintain component config at site level in Editable Template?

Avatar

Level 4

We are using editable template for building website. It has 10 templates in total and all follow same header and footer. As per editable template, if you create a design dialog in component and it's properties gets stored in polices, in the /conf location  but the problem here is we have to maintain the same config in 10 templates because it is not for the website instead it is for per template.

Assume that tomorrow I need to make some change in header section of navigation component then I have to open all 10 editable templates and update the navigation component in order to have consistent behaviour across the site. 

Actually I wondered  how this works in we-retail website so I take a look how we-retail website it is designed and ended up the same situation. Things tried in we-retail website, 

Page 1 is created using /conf/we-retail/settings/wcm/templates/hero-page editable template
Page 2 is created using /conf/we-retail/settings/wcm/templates/content-page editable template
Page 3 is created using /conf/we-retail/settings/wcm/templates/section-page editable template

 

Now I want to change the navigation component. Since it is design dialog, I have to edit this component only in template editor(No design mode in editable template). I went to /conf/we-retail/settings/wcm/templates/hero-page template and made the "Navigation Structure Depth" value from 2 to 4. It works only in Page 1 because I modified only hero-page template and the change did not apply for  Page 2 and Page 3 because it is using different template hence I have to open content-page and section-page template and edit the navigation component to have same behaviour  across sites. I would say it is big disadvantage because there may human error while making this change in all templates. 

Component configs gets stored in respective template location as like below,

 

/conf/we-retail/settings/wcm/templates/hero-page/structure/jcr:content/root/header/navigation
/conf/we-retail/settings/wcm/templates/content-page/structure/jcr:content/root/header/navigation
/conf/we-retail/settings/wcm/templates/section-page/structure/jcr:content/root/header/navigation

 

 

What is the recommendation from AEM to manage this type of situation ? Just would to hear what is the best practice and solution approach from AEM? 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Hi @Anderson_Hamer!

For this kind of use case I recommend to leverage Experience Fragments (XF). This is a common approach that I have seen in many of my projects.

I did notice your comment on @arunpatidars reply who already suggested this approach but I'm unsure about your conclusion that this is not a proper usage of XFs.

 

One of the key requirements that Experience Fragments have been introduced to solve is the use case of a central library for content snippets (such as a shared navigation or other parts of the content) that are often reused both, throughout your site and externally. Please refer to the authoring documentation on XFs:

"Experience Fragments should be used:

Whenever you want to reuse experiences.

Experiences that will be reused with same or similar content."

In my experience, XFs are a totally valid and successful approach to solve the requirement that you are outlining. For small changes that your navigation may need in only some of your editable templates, you can leverage XF variations and refer to them while still keeping the connection to the "original" XF used in the other templates.

 

Hope that helps!

View solution in original post

3 Replies

Avatar

Community Advisor

Hi,

Why don't you create expereince fragment for header, navigation or footer etc, and add the the common content in the site/template using expereince fragment component.



Arun Patidar

Avatar

Level 4
Thanks for your reply. The purpose of experience fragment is different. I dont want to create a XF for just to keep navigation component. Any others solution we have ?

Avatar

Correct answer by
Employee Advisor

Hi @Anderson_Hamer!

For this kind of use case I recommend to leverage Experience Fragments (XF). This is a common approach that I have seen in many of my projects.

I did notice your comment on @arunpatidars reply who already suggested this approach but I'm unsure about your conclusion that this is not a proper usage of XFs.

 

One of the key requirements that Experience Fragments have been introduced to solve is the use case of a central library for content snippets (such as a shared navigation or other parts of the content) that are often reused both, throughout your site and externally. Please refer to the authoring documentation on XFs:

"Experience Fragments should be used:

Whenever you want to reuse experiences.

Experiences that will be reused with same or similar content."

In my experience, XFs are a totally valid and successful approach to solve the requirement that you are outlining. For small changes that your navigation may need in only some of your editable templates, you can leverage XF variations and refer to them while still keeping the connection to the "original" XF used in the other templates.

 

Hope that helps!