[Zope3-Users] no Add menu in custom container view

Ivan Horvath pillesoft at gmail.com
Mon Mar 26 04:34:16 EDT 2007


Dear Frank, Mats,

thank you for your helpful answers.
after adding the add attribute for the containerViews i have the add
menu for the type category

unfortunately this information i couldn't find in any documentation :-(

On 3/24/07, FB <fbo2 at gmx.net> wrote:
> On Fri, Mar 23, 2007 at 03:27:31PM +0100, Ivan Horvath wrote:
> > Dear All,
> >
> > i'm rather new to zope3, thus knowing more and more, but still i have
> > many problems.
> > first i displayed the container contents with the very fast solution
> > containerViews in browser/zcml
> > it was nice, i have everything what i need, of course i could Add new
> > object in the container, because i had an Add menu.
> >  <browser:addMenuItem
> >      title="Type Category"
> >      factory="fa.TypeCategory"
> >      view="addTypeCategory.html"
> >      permission="zope.ManageContent"
> >      />
> >
> >  <browser:page
> >    for="zope.app.container.interfaces.IAdding"
> >    name="addTypeCategory.html"
> >    class=".helper.TypeCategoryAddForm"
> >    permission="zope.ManageContent"
> >    />
> >
> > i had to create a customized contents view page, so created a new view
> > object. it is inhertied from BrowserView.
> > this is the page declaration in zcml:
> >  <browser:page
> >      for="..interfaces.ITypeCategoryContainer"
> >      name="index.html"
> >      class=".helper.TypeCategoryContainerView"
> >      permission="zope.View"
> >      template="list.pt"
> >      menu="zmi_views" title="List"
> >      />
> >
> > for the display of the contents i use zc.table solution
> > the problem is here, because the nice Add menu is disappeared.
> > what can be the problem?
>
> You can include the menu for adding subobjects like that:
>
>   <div tal:replace="structure context/@@commonTasks" />
>
> Don't forget to provide an adding-view for your container like this:
>
>   <containerViews add="zope.ManageContent" />
>
> Regards,
>
> Frank
> _______________________________________________
> 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