[Zope3-dev] Add item blues...
Adam Summers
adam@4js.com.au
Wed, 02 Jul 2003 20:17:35 +0800
Hi,
I have a product which uses folder as a base class:
class Foo(Folder):
.. and in the configure.zcml I set this up:
<browser:page
name="contents.html"
menu="zmi_views" title="Contents"
for=".interfaces.IFoo"
permission="zope.ManageContent"
class="zope.app.browser.container.contents.Contents"
attribute="contents" />
.. and I also define a menu:
<browser:menu
id="add_bar"
title="bar items" />
<browser:menu
id="bar_actions"
title="bar actions" />
...and have a bar object definition with its own addform
<browser:addform
schema=".interfaces.IBar"
label="Add Bars"
content_factory=".bar.Bar"
fields="wid get"
name="Add Bar"
menu="add_bar" title="Bar info"
permission="zope.ManageContent" />
My question is this: What do I have to do, so that when I look at the
contents of the folder, the "Add new Content Menu" contains an option to
add a bar (and only that option)? I would be grateful for any pointers.
Many thanks,
Adam