On Saturday 14 October 2006 06:50, Lorenzo Gil Sanchez wrote: > Hi, > > I'm having problems with my Add Forms views (based in > formlib.form.AddForm) in my transition from Zope 3.2 to Zope 3.3. > > In Zope 3.2 I registered my views like this: > > <page > for="zope.app.container.interfaces.IAdding" > name="addPerson.html" > class=".person.AddForm" > permission="zope.Public" > menu="zmi_views" > title="Add Person" > />
Well, the menu entry should not really be here; also adding it to zmi_views is wrong. You want to use the "addMenuItem directive. However, this does not explain that the menu item is showing up in the IPerson tabs. > 1. If I don't add the directive <containerViews> to my container I get a > NotFound exception when going to '/mycontainer/+/addPerson.html'. To fix > this problem I have added this directive: > > <view > name="+" > for="myapp.interfaces.IMyContainer" > class="zope.app.container.browser.adding.Adding" > permission="zope.ManageContent" > /> You should not need this, if you specify the "add" attribute in the containerViews directive: <browser:containerViews for="zope.app.folder.interfaces.IFolder" contents="zope.ManageContent" index="zope.View" add="zope.ManageContent" /> > 2. When my add form is displayed in the Rotterdam skin I get an extra tab > for every other contenttype I have a page registered like the example > above. For example, I also have a Product content type and it has an > AddForm like the Person AddForm. When I'm looking at > '/mycontainer/+/addPerson.html' I got 4 tabs: > > - Add (the one for adding the person) > - Add Product > - Introspection > - Registration All that makes sense, since you are in the adding view and you registered a zmi_views entry for IAdding. Just remove it, as I suggested above. Regards, Stephan -- Stephan Richter CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student) Web2k - Web Software Design, Development and Training _______________________________________________ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users