[Zope-CMF] Question on Default Skins

Carl Rendell cer@sol43.com
Wed, 31 Jul 2002 16:42:17 -0700


Chris,

This is the point in the thread that elaborates on the cookie 
setting method. It is in dtml, but the basics are there for use in 
a site access rule. I've testing the following script and it is 
working as I expected, albeit with cookies -

from string import split, find

host = split(context.REQUEST.SERVER_URL,'//')[1]

if find(host, 'siteName1') >= 0:
   context.REQUEST['RESPONSE'].setCookie('portal_skin', 'basic')
else:
   context.REQUEST['RESPONSE'].setCookie('portal_skin', 'alternate_skin')

It's not perfect yet.. but it is pretty close.

The thread I was looking at is here:

http://lists.zope.org/pipermail/zope-cmf/2002-June/013209.html

~C


On Wednesday, July 31, 2002, at 02:30  PM, Chris Withers wrote:

> Carl Rendell wrote:
>> I'm looking to leverage skins a little more in a dual domain site 
>> instance, and I'm familiar with using access rules to set the 
>> skin preference cookie based on the domain name. (there was a 
>> discussion on the list about this a while back)
>
> Ooo... can you point me to that thread? This is something I'm 
> really interested in!
>
>> Question is... Is there another way to do this without using cookies?
>
> I was planning on customizing the skins tool to behave in just 
> this way...
> ...or better yet in a mroe customizable way ;-)
>
> IIRC, there may be just one method of the SkinsTool class that 
> needs replacing...
>
> cheers,
>
> Chris
>
>
>

Carl E. Rendell
Solution43
Information Distribution Consulting        |   "Ahhhh the power of
cer@sol43.com                              |    acquisition"  - Chef Z