How to reorder collection items?

I’m trying out the collection/list type to see how it compares to a singleton type that contains a set (comparing to tree is next - really wish the docs had some better discussion around these types and what use-cases are better suited for which types). One aspect that I seem to be stuck on is item sorting. What I want to do is give the content management users the ability to reorder items in a collection by dragging them, which would affect the order of the items as the API receives them (assuming the API call isn’t otherwise overriding the order).

With the singleton/set, this can be done by dragging items around in the UI, but that doesn’t seem to be supported with the collection/list type as there are no drag handles. I looked for an option to enable it, but the only options I see are for color, icon, and revisions.

Digging around this forum, I’ve found references to a “custom sortable entries” option, but I don’t see that anywhere. Maybe it was removed or renamed at some point?

Is there any way to accomplish this?

Hey :wave:

For such use-case use the tree model type. To prevent nesting items you can set the maxlevel to 0 in the model meta options:

When requesting the items via api, sort by the internal _o field:


That worked great, thank you!