[Zope3-Users] [ZCML] Issue with conflicting browser:page decl

Marius Gedminas marius at gedmin.as
Wed Aug 5 10:11:44 EDT 2009


On Tue, Aug 04, 2009 at 07:22:36PM +0200, Andreas Jung wrote:
> Hi there,
> 
> I'm really puzzled about the following ZCML configuration conflict
> where I am trying to override a browser:page for defined in
> dateable.chronos.browser.events.EventListingView.upcomingEvents
> with slightly customized implementation within my own idg.theme package.
> Both ZCML configuration are of course identical except the the 'class'
> is different.
> Anything I am missing?

The ingenious model of ZCML overrides.

You have a tree of ZCML files that include other files:

  site.zcml
    zope.foo/configure.zcml
      zope.foo/browser.zcml
    zope.bar/configure.zcml
    ...

Parent nodes in this tree can override any directives in descendent
nodes.

<includeOverrides> doesn't create a child node; it inserts the
directives directly into the current node.  This means it overrides
stuff by piggy-backing on the more general "parent nodes override
children" mechanism.

This means (counterintuitively) that even includeOverrides cannot override
anything in parent or sibling nodes.

What you need to do is move your overrides up in the include tree.

HTH,
Marius Gedminas
-- 
EMACS is a good OS.  The only thing it lacks is a decent text-editor.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mail.zope.org/pipermail/zope3-users/attachments/20090805/4bf9569f/attachment.bin 


More information about the Zope3-users mailing list