How do you programmatically reorder ATFolder subclass children?

I have a Plone product that uses its own type of folders to host a set of custom content objects. The folder type was created by subclassing BaseFolder and has a schema with several text fields. Currently, when user objects are added to the user folder, objects are sorted alphabetically by their identifier. How can I override this behavior and allow users to sort user folders manually, say, through the "Content" view?

+6
python zope plone archetypes
source share
1 answer

Quick fix: subclass from ATFolder instead of BaseFolder. This gives you all the β€œnormal” reordering settings and other features of the plmon folder (which I suspect you also want).

If you want to be more selective, check out Products /ATContentTypes/content/base.py: ATCTOrderedFolder and OrderedBaseFolder.

+4
source share

All Articles