[Zope-CMF] Lost in SkinSpace!
Kevin Carlson
khcarlso@bellsouth.net
Mon, 1 Jul 2002 10:28:53 -0400
You could use an access rule as Tres suggested or you could use a
VirtualHostMonster in conjunction with Apache to rewrite the URL upon going
to a specific folder. I have opted for the second method over Access Rules
whenever possible as I usually end up botching something up and pulling out
a few hairs whenever I try to use an access rule... :-)
-----Original Message-----
From: zope-cmf-admin@zope.org [mailto:zope-cmf-admin@zope.org]On Behalf
Of Tres Seaver
Sent: Monday, July 01, 2002 9:24 AM
To: Jon Edwards
Cc: Kevin Carlson; Roger Espinosa; Zope-Cmf
Subject: RE: [Zope-CMF] Lost in SkinSpace!
On Mon, 2002-07-01 at 06:27, Jon Edwards wrote:
> Thanks Kevin,
>
> That got me digging round and pondering a bit more! Two thoughts -
>
> 1. What would you call this DTML-method, and how would you make sure it is
> always called (even if they go direct to the 'index_html' - eg. when
they've
> bookmarked it)?
>
> Showing my ignorance of hotfixing/subclassing now, but if you called it
> "setupCurrentSkin" (and probably made it a PythonScript for speed?), would
> it get called instead of the function of the same name in Skinnable.py?
> You'd then need to make sure the line "dtml-call setupCurrentSkin" went to
> the right place, so could you do "dtml-call Skinnable.setupCurrentSkin",
to
> stop it calling itself recursively?
>
> 2. I'm going to be doing it this way throughout all my sites, so long-term
I
> think it will be slightly faster if I hotfix/subclass the source-code?
>
> After further code-diving, I wonder if I'd be better to hotfix/sub-class
> Skinnable.py, rather than SkinsContainer? One way might be to change the
> "getSkinsFolderName" function (which is currently not implemented) to do -
>
> def getSkinsFolderName(self):
> # Returns local skin choice.
> sk_choice = context.skin_choice
> return sk_choice
>
> Hoping Tres, Seb, or another guru will tell me if that's a good place to
do
> it! :-)
You could use an AccessRule on each subfolder which just did the
'REQUEST.set' as the folder was traversed; much nicer than subclassing,
IMNSHO :)
Tres.
--
===============================================================
Tres Seaver tseaver@zope.com
Zope Corporation "Zope Dealers" http://www.zope.com
_______________________________________________
Zope-CMF maillist - Zope-CMF@zope.org
http://lists.zope.org/mailman/listinfo/zope-cmf
See http://www.zope.org/Products/PTK/Tracker for bug reports and feature
requests