I created page using create-> page under parent page. But it is not inheriting page properties of parent page. Please suggest. | Community
Skip to main content
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

Mohit_KBansal
Adobe Employee
Adobe Employee
July 22, 2022

@sangrampatil111 When you say inheriting parent properties, do you mean inheriting it via JavaCode?

You can achieve it by using InheritanceValueMap in your Model.

import com.day.cq.commons.inherit.InheritanceValueMap;
import com.day.cq.commons.inherit.HierarchyNodeInheritanceValueMap;

@ScriptVariable
private Page currentPage;
...
InheritanceValueMap ivm = new HierarchyNodeInheritanceValueMap(currentPage.getContentResource());
String inheritedValueMyCustomProperty = ivm.getInherited("myCustomerProperty", String.class);
String inheritedValueJcrTitle = ivm.getInherited("jcr:title", String.class);
Level 3
July 22, 2022

No. Not through Java.

 

Mohit_KBansal
Adobe Employee
Adobe Employee
July 22, 2022

Please explain your requirement.

Level 3
July 22, 2022

Can you please check inheritance stat level property anywhere? Parent page should have Iparsys or Experience fragment for header and footer.