[Zope-CMF] Placeful default skin?

Tres Seaver tseaver@zope.com
Tue, 11 Dec 2001 17:12:14 -0500


Lalo Martins wrote:

> I think this was discussed in this list in the past, but not in the
> recent past, so perhaps something changed.
> 
> I have a site like
> 
> TheSite
> |
> +- News
> |  |
> |  +- Local
> |  |
> |  +- International
> |  |
> |  +- Sports
> |
> +- Movies
> 
> There are, of course, other things (such as the Members folder) in the
> "root". These use a default CMF skin.
> 
> But my customer wants the default skin inside "News" to be different
> from the global one. Also, sooner or later he'll want Sports to use a
> different skin too.
> 
> Is this at all possible? I tried to change SkinsContainer.getSkin()
> to acquire a property, but it didn't work.

The SkinnableObjectManager base class looks up and caches the skin
during initial traversal, before the acquisition context you want
has been set up.

You could create a Python Script set it up as an AccessRule
for your subfolder (I think).  It would stuff the new skin name
into the REQUEST and then call 'setupCurrentSkin', which would
recompute the skin object.

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com