I'm trying to write a query to list only one level of child pages but I'm getting the list from all the levels.
below is the query I'm trying, is there a way we can get only one level of child pages.
http://localhost:4502/bin/querybuilder.json?type=cq:Page&path=/content/xyz&orderby=@jcr:title
any quick help?
Solved! Go to Solution.
Views
Replies
Total Likes
@SonuR1 you can add path.flat=true which would list only direct child pages.
path.flat=true | If true searches only the direct children . |
please try below
FYI: https://github.com/paulrohrbeck/aem-links/blob/master/querybuilder_cheatsheet.md
Also, i'm not sure about exact requirement, but you can also try getting direct child pages using API instead of query.
https://www.tabnine.com/code/java/methods/com.day.cq.wcm.api.Page/listChildren
@SonuR1 you can add path.flat=true which would list only direct child pages.
path.flat=true | If true searches only the direct children . |
please try below
FYI: https://github.com/paulrohrbeck/aem-links/blob/master/querybuilder_cheatsheet.md
Also, i'm not sure about exact requirement, but you can also try getting direct child pages using API instead of query.
https://www.tabnine.com/code/java/methods/com.day.cq.wcm.api.Page/listChildren
thanks it worked
Views
Likes
Replies
Views
Like
Replies