[Zope-CMF] Skins inheriting skinpaths?
Tres Seaver
tseaver@zope.com
23 Apr 2003 15:33:27 -0400
On Mon, 2003-04-21 at 21:08, Paul Winkler wrote:
> 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.
+1 for the notional "CMF 1.5" release.
Tres.
--
===============================================================
Tres Seaver tseaver@zope.com
Zope Corporation "Zope Dealers" http://www.zope.com