[Zope3-Users] Add menu item creation
Dmitry Vasiliev
lists at hlabs.spb.ru
Tue Jul 26 07:00:52 EDT 2005
marc at rijken.org wrote:
>> From: Dmitry Vasiliev lists at hlabs.spb.ru
>> Date: Tue, 26 Jul 2005 11:14:35 +0400
>> To: zope3-users at zope.org
>> Subject: [Zope3-Users] Add menu item creation
>>
>>
>> Hi!
>>
>> Is this a way to create the add menu item without the separate addMenuItem
>> directive? For example if I write:
>>
>> <addform
>> ...
>> menu="zope.app.container.add" title="Title"
>> />
>>
>> I've got the following error:
>>
>> ConfigurationError: ('Invalid value for', 'menu', 'ImportError: Module
>> zope.app.container has no global add')
>>
>> Maybe the menu id should be changed?
>>
> Hi Dmitry,
>
> Your analyse was correct: the menu-id may be incorrect. The menu-id has to
> be declared in ZCML before it's use in ZCML. Like:
>
> <menu
> id="zmi_views"
> title="Menu for displaying alternate representations of an object" />
>
> In this case zmi_views is the menu-id to be used.
So the question is: Should the menu id 'zope.app.container.add' be changed to
something like 'container_add' in zope/app/menus.zcml?
--
Dmitry Vasiliev (dima at hlabs.spb.ru)
http://hlabs.spb.ru
More information about the Zope3-users
mailing list