Sortable data in Page datafolders

Topics: General
Mar 15, 2011 at 2:46 PM

I have a bunch of data in a page datafolder that i want to sort in a specific order. Cut and paste don't seem to work, like on normal pages - is this intentional? I know i can add a sortorder field to the datatype but imo this feels very clumsy, it should be handled by the CMS. But even if i add such a sortorder field, how do i make sure its taken into account when C1 shows the data in the page tree? As it is know its just sorting by the structural title field, which doesn't help me at all.

Mar 15, 2011 at 3:12 PM

There is no "change positioning" features build into data items (good feature request though) so you would need to have a field on your data type which can manage the detailed positioning. You can have users manage this directly while editing it or you can spend time introducing ui login that work with the tree.

You should look into the "Tree Definition XML" feature:

Basically you use a set of domain specific XML elements that let you customize data driven trees and associated commands. I would expect you would be able to quickly do ordering based on a numeric field on your data. As a step two I would expect you can create commands for the tree elements for moving them around.

Full control: write a provider
If you want to hit the raw metal and do what ever you want with trees (including cup/paste features) you can write a custom Element Provider that manage your tree. There is a basic version shown at - if you look at the PageElementProvider in the source code you can see how cut/paste is implemented (hint: IDragAndDropElementProvider)

Mar 15, 2011 at 4:38 PM

Yeah, i know how to make own Tree Defintions... just though that sorting was such a basic requirement that you would need again and again (and again) that making a custom tree definition every time (just to get sorting) quickly became tedious.

Mar 18, 2011 at 9:28 AM

Added as a feature request, so people can vote on it: