cancel
Showing results for 
Search instead for 
Did you mean: 

Arbitrary Ordering of Docs in 4.0 Document Library

cpaul
Champ on-the-rise
Champ on-the-rise
Hi all,

A client has requested a feature for ordering documents by an "index" or "order" attribute, rather than allowing the documents to be sorted alphabetically. I notice in the node browser that a folder's children have an "Index" attribute:

[img]http://img189.imageshack.us/img189/9398/screenshot20120402at124.png[/img]

Is there any way to tap into this attribute manually to adjust the display order of a document in the doc lib?

Thanks in advance,
Chris
3 REPLIES 3

mrogers
Star Contributor
Star Contributor
I don't think that "index" is something you could use, its just an index in a collection.

You may be able to sort on other properties though?

cpaul
Champ on-the-rise
Champ on-the-rise
Ok, that makes sense. We had actually established a custom "order" attribute that stores an integer order index. I'll look into using that to sort, I've seen a few posts on that.

Thanks!

cpaul
Champ on-the-rise
Champ on-the-rise
The solution I went with was to add a custom sort option for the document library. Alfresco 4.0 makes this really easy!

<config evaluator="string-compare" condition="DocumentLibrary">
   <sorting>
      <sort label="sort.label">my:attribute</sort>
   </sorting>
</config>