page sorting on siteadmin
Hi,
is it possible to order pages in a certain way through site admin and then when we do an xpath search retain the order we defined through siteadmin for results we find through xpath search.
Thanks
Chris
Hi,
is it possible to order pages in a certain way through site admin and then when we do an xpath search retain the order we defined through siteadmin for results we find through xpath search.
Thanks
Chris
Usually you don't have a search when you want the node order and can simply use navigational access (node.getNodes()) in that case. Example at [1] and then in logic you can apply filter.
In Jackrabbit/CRX you can globally configure "respectDocumentOrder" for the query index, which is turned off by default, since it is expensive. It would have effect on queries w/o any order by statement (and might only affect xpath & sql). There is no explicit order by document order statement at all.
[1]
<%
Resource r = slingRequest.getResourceResolver().getResource( "/content/geometrixx/en");
Node rootNode = r.adaptTo(Node.class);
NodeIterator it = rootNode.getNodes();
while(it.hasNext()){
Node node = it.nextNode();
%>
<%=node.getName()%>
<%
}
%>
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.