[Zope-CMF] Re: Views not found
Jens Vagelpohl
jens at dataflake.org
Tue Mar 28 17:58:12 EST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 28 Mar 2006, at 23:46, Tres Seaver wrote:
> Really, *neither* product should have a 'browser:defaultSkin'
> directive
> in its configure.zcml: that directive belongs only in the user's
> site.zcml, or *maybe* in a slug in 'package-includes': it is
> "pure" policy.
OK, so I'd be +1 on removing that in CMFDefault/skin/configure.zcml
and documenting the way these are "turned on".
I'm coming up against the next item, which is "how to correctly refer
to a layer defined somewhere else". In CMFCalendar, I need to make
sure the skin layers for CMFDefault are also available. There seem
to be two routes I could choose:
- - define my own cmfcalendar skin and layer. Declare it as a
combination of layers cmfcalendar, cmf and default.
- - stick my views directly into layer "cmf" and don't worry about
defining my own layeer or skin.
Both ways require that I refer to layers defined in CMFDefault/
browser/configure.zcml. I tried them both, but always get errors
where parsing my configure.zcml blows up trying to resolve the "cmf"
layer name. Here's the examples:
- - Stick my views into the "cmf" layer in browser/configure.zcml:
<browser:page
for="Products.CMFCalendar.interfaces.IEvent"
name="view.html"
class=".event.EventView"
template="templates/event.pt"
permission="zope2.View"
layer="cmf"
/>
- - Define my own layer and skin, and mix in the "cmf" layer in skin/
configure.zcml:
<browser:layer
name="cmfcalendar"
/>
<browser:skin
name="cmfcalendar"
layers="cmfcalendar cmf default"
/>
Both lead to errors like this:
<snip>
ConfigurationError: ('Invalid value for', 'layer', "ImportError:
Couldn't import cmf, No module named cmf")
jens
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)
iD8DBQFEKb+ERAx5nvEhZLIRAnb9AJ99PI7MlaP95JL6jV3tYpZpt4AoAQCeKn/u
1gfSZS2rar+ycnGszE6l3qI=
=YjiH
-----END PGP SIGNATURE-----
More information about the Zope-CMF
mailing list