Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
SOLVED

Need to get page property from root page

Avatar

Level 6

Hi Team,

 

I have page structure like below.

us_en

    ---------Home page

                                 -------------Page1

                                 -------------Page2

 

I Have some property in us-en like Site Name  if i enter sitename=xyz.com the same site name i need to get in page1 and page 2 how i can get inherited page properties of page.

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Could you please refer https://www.albinsblog.com/2017/12/how-to-get-inherited-properties-in-adobe-experience-manager-filte... 

HierarchyNodeInheritanceValueMap - This will help to retrieve the inherited properties from parent pages.

 

https://sourcedcode.com/blog/aem/aem-quick-reference/aem-inheritedpageproperties-with-sightly-jsp-os...

 

hope these will help.

View solution in original post

4 Replies

Avatar

Community Advisor

Hi,

 

Try using context aware configuration, using this you can set the common values at parent page and same can be read in all the child pages. These are easy to update on the fly without any code changes.

 

https://experienceleague.adobe.com/docs/experience-manager-core-components/using/developing/context-...

Avatar

Level 6

Hi,

I have used custom property for page component.

The value of property is not present in child page i need to get from parents page.

 

If any one did to inheritance of custom property plz share how to implement 

Avatar

Correct answer by
Employee Advisor

Could you please refer https://www.albinsblog.com/2017/12/how-to-get-inherited-properties-in-adobe-experience-manager-filte... 

HierarchyNodeInheritanceValueMap - This will help to retrieve the inherited properties from parent pages.

 

https://sourcedcode.com/blog/aem/aem-quick-reference/aem-inheritedpageproperties-with-sightly-jsp-os...

 

hope these will help.

Avatar

Community Advisor

Hi,

Use inheritedPageProperties object in sightly or in the model

${inheritedPageProperties.prop1}


https://experienceleague.adobe.com/docs/experience-manager-htl/using/htl/global-objects.html?lang=en
global 

 



Arun Patidar