[ZCM] [ZC] 1339/ 2 Comment "Ordered Folder in ZMI"
Collector: Zope Bugs, Features,
and Patches ...
zope-coders-admin at zope.org
Fri May 28 09:36:51 EDT 2004
Issue #1339 Update (Comment) "Ordered Folder in ZMI"
Status Pending, Zope/bug medium
To followup, visit:
http://collector.zope.org/Zope/1339
==============================================================
= Comment - Entry #2 by mjablonski on May 28, 2004 9:36 am
Just a single patch for Zope/lib/python/App/dtml/menu.dtml. Works well for "Folder (Ordered)" and doesn't disturb the "classical" sorting (which depends on some magic in the tree-tag I guess) in a serious way.
> 37c37
> < <dtml-tree nowrap=1>
> ---
> > <dtml-tree branches_expr="[item for item in
> objectValues() if item.isPrincipiaFolderish]" nowrap=1>
________________________________________
= Request - Entry #1 by Anonymous User on May 18, 2004 2:35 am
Folder objects are ordered nicely in the right management window of the ZMI but if you look at the tree on the left side all folders are ordered alphabetically. According to my question in the Zope mailing list Maik Jablonski provided the following solution:
- Create a PythonScript (just one line of code) in the Root of the ZMI
with id = bobobase_object_position:
return context.aq_parent.objectValues().index(context)
- Then patch Zope/lib/python/App/dtml/menu.dtml and change
<dtml-tree nowrap=1>
to
<dtml-tree nowrap=1 sort=bobobase_object_position>
This worked for me and it would be nice if this would be implemented in upstream Zope.
==============================================================
More information about the Zope-Collector-Monitor
mailing list