Expand my Community achievements bar.

SOLVED

QueryBuilder is not fetching node in same order present in crx/de or site admin

Avatar

Level 7

I tried fetching the node from query builder it is returning nodes in random order. I want to fetch it in the same order as it is present in CRX/de or site admin is there any way to do that?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi

If you need to order, you have put the order by clause. Following will sort by node path(tree)

orderby = @jcr:path  

Kannan_C_0-1668605190406.png

can simply use navigational access (node.getNodes()) in case you want node order.

Thanks 

View solution in original post

2 Replies

Avatar

Employee Advisor

@Ronnie09 

Can you post the query and the result snapshot here

Avatar

Correct answer by
Community Advisor

Hi

If you need to order, you have put the order by clause. Following will sort by node path(tree)

orderby = @jcr:path  

Kannan_C_0-1668605190406.png

can simply use navigational access (node.getNodes()) in case you want node order.

Thanks