Reputation: 1314
I'm trying, in Adobe CQ 5.6.1, to build a menu listing components added to a page. These components will have an id and I will anchor-link to these so the page will scroll down to them respectively.
The problem is i get them in scrambled order.
If I laborate in the query builder and with the local Geometrixx site (so you can follow, if you have a local instance of CQ running) this would be an example of a similar query, picking images and text components from the products page:
I'm not at all interested in ordering them by jcr:lastModified, I want the order they are presented on the page.
Does anyone have any idea what to order by?
Upvotes: 2
Views: 1383
Reputation: 440
Following on from your comment, iterating over the components seems to be the easiest way.
Assuming you have the id stored as a property, on successive iteration of each component node, you would seek to extract this id and store it into a list.
This would ensure the order as you require, and you can then display the id as links.
Upvotes: 2