[Zope-CMF] Re: Directory-based skin layers?
Ricardo Newbery
newbery at dvgroup.com
Wed Apr 21 19:43:07 EDT 2004
Thanks for the suggestions. Got a follow up question.
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).
Let's see if I understand the basic steps...
The SkinnableObjectManager calls self.setupCurrentSkin(),
which tries to get the skin via getSkinNameFromRequest(),
then sets the skin via changeSkin(),
which sets the volatile variable
_v_skindata = (self.REQUEST, skinobj, {})
The __getattr__ method then delegates to the skin object set in
_v_skindata previously.
This skin object is itself a chain of acquisition-wrapped folders and
returns the appropriate object via getattr().
Okay, now for my question.
Assuming that I want to leave SkinnableObjectManager alone, it would
seem, as suggested, that I need to subclass or wrap SkinsTool to
insert the "local" skin layers in the skin object chain. But I'm
unclear how my new SkinsTool would look up the acquisition context of
the published object which I think I need in order to find the
"local" skin layers. Am I missing something obvious? Munging the
requested object from the REQUEST dictionary seems like the wrong way.
Thanks again,
Ricardo Newbery
More information about the Zope-CMF
mailing list