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

Need to get page property from root page

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.
DEBAL_DAS
DEBAL_DASAccepted solution
New Participant
May 2, 2022 4:45 PM UTC

4 replies

arunpatidar
New Participant
May 2, 2022 5:11 PM UTC

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 

 

Translate
Arun Patidar
DEBAL_DAS
DEBAL_DASAccepted solution
New Participant
May 2, 2022 4:45 PM UTC

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.

Translate
Ravi_Pampana
New Participant
May 2, 2022 3:00 PM UTC

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

Translate
manikanthar1295
Level 5
May 2, 2022 3:38 PM UTC

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 

Translate