[Zope3-dev] RFP: menu item ordering

Martijn Faassen faassen at infrae.com
Fri Dec 12 09:34:50 EST 2003


Sidnei da Silva wrote:
> | Would the priorities be part of the menu item definitions? 
> | Or would they be specified separately?  
> 
> Yes, though I would imagine a separate directive for overriding would
> be useful:
>   
>   <browser:menuItemPriority
>    for="x.y.z.IContainer"
>    menu="contents.html"
>    priority="10"
>    />

If you want to get complicated, perhaps a constraint satisfaction
system would be useful. Something like:

item with name A needs to be after item with name B, if such exists

item with name A needs to be directly behind item with name B, if such
exists

item with name A needs to be before item with name B, but after item with
name C.

item with name A needs to come first as much as possible

if the constraints can't all be resolved, you could selectively
start dropping them (perhaps those with lesser priority :).

I think a few of such constraints could already go a long way. In fact
the current ordering in fact is based on constraints in part (specificity of
interface, etc).

Regards,

Martijn




More information about the Zope3-dev mailing list