[Product-Developers] Ordering contents in a borg.project workspace
Giovanni Toffoli
toffoli at uni.net
Tue Mar 2 16:52:10 UTC 2010
In a couple of sites I use borg.project to implement reserved areas.
Since I find annoying not being able to order contents inside a b-org
workspace, I've tried to modify the class Project inside the module
content.py, by letting it to derive also from OrderedContainer (defined in
Archetypes.OrderedBaseFolder). It seems to me that OrderedContainer
implements just ordered container functionality and isn't dependent on the
Archetypes machinery.
This is my patch:
from Products.Archetypes.OrderedBaseFolder import OrderedContainer
# class Project(Container):
class Project(Container, OrderedContainer):
As result of the above patch
- "OFS.interfaces.IOrderedContainer" has been added to the "Provided
Interfaces" of the instances
- the "Order" column shows at the right end of the folder_contents view
- dragging the four-points handle to change the order seems to work at first
Bu the contents still are listed in the previous order, when I refresh the
folder_contents view or select another view (listing, summary), although the
value of getObjPositionInParent seems to have been affected by the manual
reordering.
Anybody can suggest to me what else to do in order to reach my goal? TIA.
Giovanni
(I still have borg.project-1.1rc3, but from the change-log it seems than no
ordering is supported in newer versions.)
More information about the Product-Developers
mailing list