[Zope-CMF] Re: Directory-based skin layers?
tseaver at zope.com
Thu Apr 22 23:23:56 EDT 2004
Ricardo Newbery wrote:
> At 1:35 AM +0200 4/23/04, Dieter Maurer wrote:
>> Ricardo Newbery wrote at 2004-4-21 16:43 -0700:
>>> Again, I'm trying to grok how this skinning machinery works and
>>> looking for the best way to insert "local" skin layers (as opposed to
>>> the "global" layers in the skins_portal).
>> Not sure, I understand what you mean with "local".
>> When "local" means "inside a subhierarchy",
>> I would use another "Skinnable" object as root of this
>> subhierarchy and define the "local" layers on this object.
> Sorry, I guess I should have included the text from my first post.
> Basically, I would like to enable directory-based skin layers which
> would take higher precedence than the layers defined in portal_skins.
> I'm NOT talking about an access rule that would reset the skin name OR a
> complete override of the portal_skins layers but rather a mechanism that
> would acquire any skin layer folders in the current directory and its
> parents and prepend them to the portal_skins layer list.
If you nest another Skinnable-derived object inside your CMF site, you
should see the effect you want, thanks to the magic of acquisition. The
"nearer" acquisition parents will each get a shot at resolving the name
*before* their own parents.
You would then drop in a separate 'portal_skins' tool in each of these
Skinnable-derived containers, and configure your "local" skins there.
Tres Seaver tseaver at zope.com
Zope Corporation "Zope Dealers" http://www.zope.com
More information about the Zope-CMF