[Zope3-Users] no Add menu in custom container view
FB
fbo2 at gmx.net
Sat Mar 24 05:48:32 EDT 2007
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
More information about the Zope3-users
mailing list