[Zope3-dev] browser:containerViews (browser:page and browser:view)

Jim Fulton jim at zope.com
Tue Feb 8 10:10:50 EST 2005


Dominik Huber wrote:
> 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?

Sounds good.

At some point, I'd really like to redo most of these directives.

Jim

-- 
Jim Fulton           mailto:jim at zope.com       Python Powered!
CTO                  (540) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org


More information about the Zope3-dev mailing list