AD0-E103 Exam QuestionsBrowse all questions from this exam

AD0-E103 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.

Show Answer
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

3 comments
Sign in to comment
PSJadhav
Jul 11, 2020

Answer is D

lexxxz88
Oct 13, 2020

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

grios
Jul 12, 2020

It's D

gkay2
Jul 18, 2020

D is the correct answer