[Zope3-Users] Usage of the order attribute
Stephan Richter
srichter at cosmos.phy.tufts.edu
Tue Sep 5 18:31:03 EDT 2006
On Wednesday 28 June 2006 16:56, Florian Lindner wrote:
> how is the order attribute of the menuItem directive being used?
>
> Do elements with a lower order come first?
> What is the order of elements that have not defined one? Is is higher than
> of all others.
I do not have an answer for, you can read the code yourself. But I think I
know what is tripping you up below.
> I wonder because I have menuItem defined with order 0 (or 1) and there is
> still one item above it which has not even order defined.
The menu items are sorted by interface specifity first and then by the order
attribute as far as I remember. But just have a good look at:
zope.app.publisher.browser.menu.BrowserMenu
The docs there actually say:
# Now order the result. This is not as easy as it seems.
#
# (1) Look at the interfaces and put the more specific menu entries
# to the front.
# (2) Sort unabigious entries by order and then by title.
Regards,
Stephan
--
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
More information about the Zope3-users
mailing list