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

Harwinder-singh
Community Advisor
Harwinder-singhCommunity AdvisorAccepted solution
Community Advisor
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.

 

Sudheer_Sundalam
Community Advisor
Community Advisor
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.

mahi1729
Level 4
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. 

Level 2
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