1.18.3 Sorting of collections

By default, your collections are sorted alphabetically by their names in the collection overview (that is, not by the names in messages_*.properties). However, it is possible to define your own sequence.

The following configuration determines how the collections are sorted:

<collections>
    <collection field="DC">
        <sorting>
            <collection>collection2</collection>
            <collection>collection1</collection>
        </sorting>
    </collection>
</collections>

Collections (raw names) that are listed here are listed first and in the specified order. All other collections are listed behind it in the standard sort (see above).

It is possible to sort certain parts of the collections. For this you can group the <collection> tags in a <sortingList>:

<collections>
    <collection field="DC">
        <sorting>
            <collection>collection2</collection>
            <collection>collection1</collection>
            <sortingList sortAfter="collection2">
                <collection>collection3</collection>
                <collection>collection4</collection>
            </sortingList>
        </sorting>
    </collection>
</collections>

The attribute sortAfter specifies the name of the collection behind which the collections listed in the sortingList are to be sorted.

If the collection specified in sortAfter has subcollections, but the first collection listed in the sortingList is on the same or a higher hierarchy level as the sortAfter collection, the collections of the sortingList are also sorted after all subcollections of the sortAfter collection.

If collections listed in <collections> have subcollections that are not contained in the sort list, they are sorted alphabetically within the listed collection.

Last updated