Sling code to fetch all page title & description under /content
Solved! Go to Solution.
Views
Replies
Total Likes
@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.
@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.
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-fo...
Hope this helps.
Thanks,
Sudheer.
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.
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
Views
Likes
Replies
Views
Likes
Replies