plone/plone.folder — pull request #1 by mauritsvanrees (2013-09-04 16:30:50+00:00)
Title: Allow sorting by a method and allow simple reversing without a key

Two things are done in this pull request:

1. In Plone 3, if the key that was used for ordering was not an attribute but a method, it would get called. This is for example how reverse ordering by getObjPositionInParent worked in collective.sortmyfolder. This fix would go some way towards resolving that in Plone 4. (Above that a new getObjPositionInParent.py skin script would be needed, but that can be done in collective.sortmyfolder if I want to. I don't intend to do that in core Plone.)

2. It would be handy to simply reverse the current order without needing to specify a key. One reason for this is that this would void the need to invent a new getObjPositionInParent script.

Tests for these changes are added. All plone.folder and plone.app.folder tests pass with these changes in Plone 4.3.