[Zope3-dev] browser:containerViews (browser:page and browser:view)
Dominik Huber
dominik.huber at projekt01.ch
Tue Feb 8 09:59:59 EST 2005
I stumbled across the following problem:
browser:containerViews uses browser:view and browser:page. Those
register optionally a menu using browser:menuItem. The menu stuff does
not support layers. Therefore registrations using the same contenttype,
menu interface and menu title (for example [1]) are leading to a
ConfigurationConflictError [2]
[1]
<browser:page
name="foo.html"
for=".IFoo"
permission="zope.View"
template="index.pt"
menu="zmi_views" title="Foo"
/>
<browser:page
name="foo.html"
for=".IFoo"
permission="zope.View"
template="index.pt"
menu="zmi_views" title="Foo"
layer=".IFooLayer"
/>
[2]
zope.configuration.config.ConfigurationConflictError: Conflicting
configuration
actions
For: ('adapter', (<InterfaceClass ..IFoo>, <InterfaceClass
..IBrowserRequest>),
<InterfaceClass zope.app.menus.zmi_views>, u'Foo')
In my opinion this behavior is a bug. I would expect that I could
register serveral pages within different layers for the same for, menu
and title.
At the moment I could provide a simple patch for the view and page
directive which prevents multi-menu registrations within the page- and
view-directive for contenttypes with the same menu interface and menu
title. Would that be ok at the moment? Later IMO we should extend the
menu stuff that menu supports layers too.
Thoughts? Objections?
Regards,
Dominik
More information about the Zope3-dev
mailing list