Need to get page property from root page | Community
Skip to main content
manikanthar1295
Level 5
May 2, 2022
Solved

Need to get page property from root page

  • May 2, 2022
  • 3 replies
  • 1443 views

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.

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

Could you please refer https://www.albinsblog.com/2017/12/how-to-get-inherited-properties-in-adobe-experience-manager-filters-servlets.html#.YnAKWehBw2x 

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-osgi-bundle

 

hope these will help.

3 replies

Ravi_Pampana
Community Advisor
Community Advisor
May 2, 2022

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-aware-configs.html?lang=en

manikanthar1295
Level 5
May 2, 2022

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 

DEBAL_DAS
DEBAL_DASAccepted solution
New Member
May 2, 2022
Debal Das, Senior AEM Consultant
arunpatidar
Community Advisor
Community Advisor
May 2, 2022

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