Hi
I am trying to find the child pages for the content path provided, I am using the below parameter to find the pages :
path=/content/geometrixx/en/toolbar type=cq:Page orderby=@jcr:content/cq:lastModified
This giving me all pages below toolbar also the childs of child like
But i want only at first level and not above account, Any idea how to add criteria in query debugger to find only child page of the path selected.
Thanks
Solved! Go to Solution.
Views
Replies
Total Likes
If you are not required to use a query, I would use the API and use somthing like this; it is much faster than a query.
Page p = ... Iterator<Page> iter = p.listChildren();
Views
Replies
Total Likes
If you are not required to use a query, I would use the API and use somthing like this; it is much faster than a query.
Page p = ... Iterator<Page> iter = p.listChildren();
Views
Replies
Total Likes
Jörg Hoh wrote...
If you are not required to use a query, I would use the API and use somthing like this; it is much faster than a query.
Page p = ...
Iterator<Page> iter = p.listChildren();
Thanks Jorg, I want to use query not because only to list children, I need to some other operation to apply on the resultset, like i want to get the child pages in sorted order & may be some more filters can be added. I have made changes in my original post, please suggest if you can provide me the parameters to be use in query debugger.
Views
Replies
Total Likes
Hi
First of all, there is variant of the listChildren() method available, where you can specify a filter. But this method does not support ordering, in that case you need to do it yourself.
I am not really familiar with the querybuilder, but if you use JCR SQL2 directly, you could use something like this:
SELECT * FROM [cq:Page] AS s WHERE ISCHILDNODE(s,'/content/geometrixx/en/toolbar') order by [jcr:content/cq:lastModified]
kind regards,
Jörg
Views
Replies
Total Likes
You can use path.flat=true in your query string to get only the direct children.
Views
Replies
Total Likes
Views
Likes
Replies