Hello, I'm happy that the ordered Folder feature is implemented now in Zope 2.7 because I wanted to use it as kind of a "Mind-Mapper" for developing a menu structure. I found out that the 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. I wuld consider it as a bug that the order which I created with ordered Folders on the right is not regarded on the left. Please convince me that this is a feature. ;-) Kind regards Andreas.
Andreas Tille wrote:
I'm happy that the ordered Folder feature is implemented now in Zope 2.7 because I wanted to use it as kind of a "Mind-Mapper" for developing a menu structure. I found out that the 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. I wuld consider it as a bug that the order which I created with ordered Folders on the right is not regarded on the left. Please convince me that this is a feature. ;-)
Hi Andreas, it's some kind of history and a "strange" default behaviour of the tree tag... Just a easy fix which should workaround your problem: - 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> That's it... Maybe you can fill out a collector issue? Cheers, Maik
On Fri, 14 May 2004, Maik Jablonski wrote:
it's some kind of history and a "strange" default behaviour of the tree tag... Just a easy fix which should workaround your problem: Thanks your fix works like a charm.
I'll do the collector report soon. But the next question opens: I try to display a whole tree with all trees unfolded. I tried <dtml-tree nowrap=1 single=0 sort=bobobase_object_position> &dtml-id; <dtml-if title> (&dtml-title;) </dtml-if> </dtml-tree> because Zope book said single Either 0 or 1. If 1, then only one branch of the tree can be expanded. Any expanded branches will collapse when a new branch is expanded. I also tried single=1 but it did not changed. Did I understand something wrong? If I open a branch in the same hight like a previousely opened one the previous branch collapses, which means I can have either + branch1 | - leaf1 + branch2 OR + branch1 + branch2 | - leaf2 but NEVER + branch1 | - leaf1 + branch2 | - leaf2 which I try to obtain. Moreover I'd like to have an "expand all" button to unfold the whole tree. I have read in Appendix A of the Zope book that there is a expand_all If this variable is true then the entire tree is expanded. Tag Control Variable which seems to me the only hint to this approach but I can't find out how to use it. Thanks for your help Andreas.
participants (2)
-
Andreas Tille -
Maik Jablonski