How to respect node order when querying assets via TagManager? | Community
Skip to main content
October 16, 2015
Solved

How to respect node order when querying assets via TagManager?

  • October 16, 2015
  • 3 replies
  • 698 views

Hey,

we are using the TagManager to query all assets with specific tags. However, we would like the assets to be in the order that they are in the CRX so that the authors can move them in the order they want to. How can we accomplish that?

We tried a manual function that traverses the tree and keeps the order in that way but that was just too slow. In a different approach we tried to use node.getIndex() to re-sort the assets we got from the TagManager but that always returns 1 for some reason..

I saw here [1] that there's a global setting but I really just want something simple and quick for this one purpose. Any ideas?

Thanks!

Paul

 

[1] http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manager.topic.html/forum__4hpt-i_want_to_querythe.html

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Sham_HC

paro22 wrote...

Is there a way to programmatically and temporarily set "respectDocumentOrder"?

Not that I am aware off. WIth AEM6 index config is stored in repo so you can change it & reindex. Still index need to be build & not recommended.

3 replies

Sham_HC
Level 10
October 16, 2015

Unfortunately those are the only options.

October 16, 2015

Bummer, thought that's a basic enough thing to do since authors actually can order stuff in the UI...

Any idea why "node.getIndex()" wouldn't work? It should show us the index/order within a node, right?

Is there a way to programmatically and temporarily set "respectDocumentOrder"?

Sham_HC
Sham_HCAccepted solution
Level 10
October 16, 2015

paro22 wrote...

Is there a way to programmatically and temporarily set "respectDocumentOrder"?

Not that I am aware off. WIth AEM6 index config is stored in repo so you can change it & reindex. Still index need to be build & not recommended.