Hi,
I have a requirement where i need to list all html pages under /content/test/test1 (title and url), How to achieve this?
I tried using json query builder but it is giving only few urls not all, please find below the json query.
type=cq:Page
group.p.or=true
group.1_path=/content/test/test1
Thanks
Srinivasula Reddy
Solved! Go to Solution.
Views
Replies
Total Likes
private void recursePages (Page rootpage)
Iterator<Page> iter = rootpage.listChildren();
while (iter.hasNext) {
final Page child = iter.next();
if (child.hasChildren) {
recursePage (child);
}
String pageTitle = child.getTitle();
String resourcePath = child.getPath();
}
}
recursePage (resourceResolver.get("/content/test/test1).adaptTo(Page.class);
Please see the API of the Page class for this.
Views
Replies
Total Likes
Hi, the limit (standard) is 10. You can increase this with the parameter "p.limit"
so to get 20 results you could write:
p.limit = 20
/Johan
Views
Replies
Total Likes
private void recursePages (Page rootpage)
Iterator<Page> iter = rootpage.listChildren();
while (iter.hasNext) {
final Page child = iter.next();
if (child.hasChildren) {
recursePage (child);
}
String pageTitle = child.getTitle();
String resourcePath = child.getPath();
}
}
recursePage (resourceResolver.get("/content/test/test1).adaptTo(Page.class);
Please see the API of the Page class for this.
Views
Replies
Total Likes
you can use p.limit= -1 that will show entire query result.
Views
Replies
Total Likes
Views
Like
Replies