A developer is creating a custom component on the page /latestBlogs.html that needs to list all the titles of the blogs pages under /content/blogs.
How does this component get the list of child pages?
A developer is creating a custom component on the page /latestBlogs.html that needs to list all the titles of the blogs pages under /content/blogs.
How does this component get the list of child pages?
To list all the titles of the blog pages under /content/blogs, you need to adapt the resourceResolver to the PageManager service because PageManager is not a static class. Once you have the PageManager instance, you can use its getPage method to get a Page object representing /content/blogs. Then, iterate through the child pages of this Page object to print the titles. This approach ensures proper session management and efficient resource access.
I think D is good. PageManager is not a static class, it is an interface.
Page atention: It is talking about QUERY DEBUGGER, that is a tool to execute and check queries. THe API is QUERY BUILDER for that rason is not C.
Answer is D. You have to adapt ResourceResolver to PageManager, since it's not a Static Class.
I go for D Explained by adobe57138 at 08-06-2020 https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager-assets/how-to-get-the-list-of-child-pages/qaq-p/365623
PageManager is static class. getPage() gives page object. Page object has listChildren() method to iterate all child pages. C and D are ruled out as Querydebugger is tool and Pagemanager is static cannot adapted from resourceResolver. B is closer neater than A.
C is the correct answer
Answer is C
Can use QueryDebugger also !!!