Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.

I created page using create-> page under parent page. But it is not inheriting page properties of parent page. Please suggest.

Avatar

Level 4
 
4 Replies

Avatar

Employee Advisor

@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);

Avatar

Level 4

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