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.
Instantiate a node object with session.getNode(/content/blogs) and then iterate through the child nodes and print the title for each.
B.
Use PageManager.getPage("/content/blogs") of the static PageManager class to instantiate a Page object and then iterate through the child pages and print the title for each.
C.
Use the QueryDebugger to look for all children of /content/blogs and then iterate through the result set and print the title for each.
D.
Adapt the resourceResolver to the PageManager service, then use the getPage(/content/blogs) to instantiate a Page object and then iterate through the child pages and print the title for each.
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.
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
lexxxz88
Highly Voted 4 years, 4 months agomtaracena
Most Recent 3 years, 3 months agochunpin
4 years, 2 months agorakayaD
4 years, 2 months agoRafael1016
4 years, 4 months agogkay2
4 years, 7 months agoeipe
4 years, 8 months agopkg82
4 years, 8 months ago