[Zope3-Users] Re: Using add menus

jürgen Kartnaller j.kartnaller at cable.vol.at
Mon Mar 14 14:54:03 EST 2005


Florian have a look into the menu demo Stephan wrote.

It tells you everything.

Jürgen

Florian Lindner wrote:
> Hello,
> I've registered a addForn and addMenuItem:
> 
>     <addform
>         label="Add CSLink"
>         title="Adds a CSLink"
>         name="AddCSLink.html"
>         schema="CS.Linklist.interfaces.ILink"
>         content_factory="CS.Linklist.link.Link"
>         permission="zope.Public"
>         layer="centershock"
>         menu="navMenu"
>     />
>     
>     <addMenuItem
>         title="The label that'll appear in the menu"
>         view="AddCSLink.html"
>         permission="zope.Public" />
> 
> 
> Now I want to use the addmenu in a ZPT. I've tried
> 
> tal:repeat="navItem context/@@view_get_menu/add_content"
> 
> tal:repeat="navItem context/@@view_get_menu/zope.app.container.add"
> 
> tal:repeat="navItem 
> context/@@view_get_menu/zope.app.publisher.interfaces.browser.AddMenu"
> 
> but all returned a empty list. The view was used in a context of a standard 
> folder.
> 
> The zmi_actions menu, used as cross-check returns the excepted items.
> 
> I'm also wondering aboutn why I can specify a menu attribute in the addform 
> directive but not in the addMenuItem?
> 
> I also don't want to have all objects that can be added to a folder but only 
> certain objects. Is there any possibility to constrain this, for example 
> based on the python path?
> 
> In which context the navMenu item with defined in the addform directive is 
> displayed?
> 
> I'm using the latest trunk version.
> 
> Thanks for bringing light into my menu confusion...
> 
> Florian



More information about the Zope3-users mailing list