Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

Best way to list children for a navigational component

Avatar

Level 4

Whats the best way to fetch a list of resources/child resources ordered by jcr:title  instead of the natural order it appear in the site admin. This is for a tree structure/navigational type component.

Is it better to use findResources (query and use order by) or listChildren, then sort in a map.

Thanks.

1 Reply

Avatar

Level 10

I would be easy and simple to use resource list. 

if you are using JSP you have look at existing component in aem.

If you are using sightly simply go for JS use api, it will provide you all helper methods.