fetch all page title & description | Community
Skip to main content
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Harwinder-singh

@mamathary999 , you can get hold of the parent content node and iterate over, filter any content if needed and then read page properties (use Page Manager if  the content is just a bunch of AEM pages) ,add each of them to a data structure like a ArrayList or a Map and finally iterate it on the HTL side.

 

3 replies

mahi1729
New Participant
August 22, 2023

Solutions provided before me perfectly works fine. But the question is what's the intent. Are you trying to build a search component or something like that? Understanding the intent for retrieving all the pages without any filtering criteria. Can you please breif on that. 

New Participant
August 22, 2023

Hi @mahi1729 

 

I am just practicing this use case , I am not aware of filter and all , trying to find the best way to achieve this use case . Can you please help me this which approach would be good

Sudheer_Sundalam
New Participant
August 21, 2023

@mamathary999 ,

This blog explains various ways to iterate over nodes and their performance implications. Please read through: https://kiransg.com/2023/04/18/comparing-stream-based-page-listchildren-and-query-builder-methods-for-listing-aem-children-pages/

 

Hope this helps.

 

Thanks,

Sudheer.

Harwinder-singh
Harwinder-singhAccepted solution
New Participant
August 21, 2023

@mamathary999 , you can get hold of the parent content node and iterate over, filter any content if needed and then read page properties (use Page Manager if  the content is just a bunch of AEM pages) ,add each of them to a data structure like a ArrayList or a Map and finally iterate it on the HTL side.