Exam AD0-E103 All QuestionsBrowse all questions from this exam
Question 57

A developer needs to implement a header component for a website. The component has the following requirements:

✑ The component should be configured once on the page highest in the hierarchy.

✑ The header component on pages lower in the hierarchy should look the same and show the same data.

✑ If necessary, the configuration can be overwritten on a child page.

✑ The component should show a list of links that are configured in the header component.

Which code snippet for returning the list of pages should the developer use?

A.

B.

C.

D.

    Correct Answer:

    The best code snippet for returning the list of pages should consider inheritance in the hierarchy, allowing properties to be overridden in child pages. This requirement points towards using methods that can fetch inherited properties. Option D fulfills this requirement by using `HierarchyNodeInheritanceValueMap` to get inherited values, which ensures that the configuration of header links can be overridden on child pages while still inheriting from parent pages when necessary. Therefore, the correct answer is D.

Discussion
PSJadhav

Answer is D

lexxxz88

Prove link: https://helpx.adobe.com/experience-manager/6-2/sites/developing/using/reference-materials/javadoc/com/day/cq/commons/inherit/HierarchyNodeInheritanceValueMap.html

gkay2

D is the correct answer

grios

It's D