[Zope3-Users] Re: Using add menus
Florian Lindner
mailinglists at xgm.de
Wed Mar 16 12:05:44 EST 2005
Am Montag, 14. März 2005 15:54 schrieb jürgen Kartnaller:
> Florian have a look into the menu demo Stephan wrote.
>
> It tells you everything.
I know this is example and it gave and is giving me a lot of enlightenment.
But unfortunatly I've found no reference that helps me with my problem
regarding add menus.
> > How can I access the add menu from a ZPT?
> >
> > 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?
Bye & Thanks,
Florian
> 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
>
> _______________________________________________
> Zope3-users mailing list
> Zope3-users at zope.org
> http://mail.zope.org/mailman/listinfo/zope3-users
More information about the Zope3-users
mailing list