[z3-five] Override it ! (zcml configuration)
Martijn Faassen
faassen at infrae.com
Wed Dec 7 16:40:53 CET 2005
Georges Racinet wrote:
[snip]
> Of course, it's still possible to write a custom etc/site.zcml for each
> given site, but this approach isn't modular enough for the scope of
> uses a bundle like CPS has, imho: you don't want to explain a guy who
> just wants to override a stylesheet and is writing its first zcml that
> he has to dig into the big tentacular site.zcml.
Note that there's another mechanism for customization in Zope 3 that may
be appropriate for some of the override usecases: layers and skins.
If you want someone to have the ability to override a stylesheet, and
that stylesheet is in a layer, you could suggest that person to make a
new product, with a configure ZCML. That configure.zcml should:
* probably include the CPS configure.zcml directly to make sure that
gets loaded first using <include package=".." />
* define a new layer (1 zcml statement)
* add a ZCML directive for the css resource or ZCML template and the like
* put it in a skin.
And then there needs to be, somehow (this is the part you need to think
about) a way to tell CPS to use the new skin.
> Since it's been a while since I've stepped on these problems, I had
> time to grow some ideas of my own, but I'm curious to hear what Five
> devs would say.
I appreciate the analysis and points, both of Zope 3 and the Zope 2
requirements. We deliberately kept the overriding infrastructure simple
but I can see it's showing its limits.
I suspect that the same applies to Zope 3 itself, not just Five. The
problem you describe with deployment, where a product wants to override
another one, also exists for Zope 3 extensions, right? (if you don't
want messy site.zcmls that people want to edit; something I don't much
like either). It may therefore be useful to make this debate into a Zope
3 core one as well.
As a side-note, I'm also interested in through the web customization
possibilities for Zope 3 and Five -- the ability to put a new version of
a ZPT in the ZODB instead of on the filesystem, and have the system use
that one if it's there.
I'm looking forward to seeing your ideas!
Regards,
Martijn
More information about the z3-five
mailing list