[Zope-CMF] Skins inheriting skinpaths?

Paul Winkler pw_lists@slinkp.com
Mon, 21 Apr 2003 18:08:43 -0700


Does anybody else find this pattern?
Create a skin, Bar  ... copy a skinpath from skin Foo and paste 
into Bar's skinpath..  add a folder or two to Bar's skinpath...
later, change Foo's skinpath and you have to change Bar's skinpath too. 

I've now got a whole lot of skinpaths that have many things in common
and it's getting really annoying to maintain them.

I'd like a solution that lets me say things like "to find items for Bar,
search folders X, Y, Z, every folder in Foo's skinpath, then folders
A, B, C."  The desired behavior would be that the skinpaths 
would be expanded dynamically, but cached for performance.
(if i can figure out when to invalidate the cache.)

But I can't think of a nice UI to represent this easily.
I could simply say that if a skinpath element happens to be the
name of another skin, then use it as a key for self.selections,
but this seems too likely to break somebody's CMF if they have skins
with names that match an ID in the skinpath. I'd like something
more explicit.

one quick hack would be to parse the skinpath elements and treat
each as a skin name if it has some magic prefix e.g. "skin:Foo".
As an example, the skins that ship with CMF could be refactored
something like:

 Core:
  topic, content, generic, control, Images

 Basic:
   custom, zpt_topic, zpt_content, zpt_generic, zpt_control, skin:Core

 Nouvelle:
   nouvelle, custom, skin:Core

 No CSS:
   no_css, custom, skin:Core

I'm like to implement something like this, and if there's interest 
i'll create a branch in CVS so others can try it.

comments welcome.
-- 

Paul Winkler
http://www.slinkp.com
Look! Up in the sky! It's OUR COOKIE OID!
(random hero from isometric.spaceninja.com)