Level 1
Level 2
Sign in to Community
Learn more
Sign in to view all badges
Expand my Community achievements bar.
This conversation has been locked due to inactivity. Please create a new post.
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.
@SonuR1 you can add path.flat=true which would list only direct child pages.
If true searches only the direct children .
please try below
http://localhost:4502/bin/querybuilder.json?type=cq:Page&path=/content/xyz&orderby=@jcr:title&path.f...
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
View solution in original post
thanks it worked 🙂
Views
Likes
Replies
Like