Need to get page property from root page | Adobe Higher Education
Skip to main content
manikanthar1295
Level 5
May 2, 2022
해결됨

Need to get page property from root page

  • May 2, 2022
  • 3 답변들
  • 1449 조회

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.

이 주제는 답변이 닫혔습니다.
최고의 답변: 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 답변

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_DAS답변
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