[Zope-CMF] Question on Default Skins
Carl Rendell
cer@sol43.com
Wed, 31 Jul 2002 19:53:20 -0700
Thanks to Tim Hoffman.. I've been able to get an implementation
which serves my purpose and objectives.
Objectives:
'Toggle' skins based on domain name using basic Zope and CMF
supplied methods, but without resorting to the use of cookies -
which are not as reliable as i would like.
Solution:
Simple python script set up as a 'Site Access Rule' within the
target CMF Site -
from string import find, split
mainHost = 'hostName'
req = context.REQUEST
domain = split(req['SERVER_URL'],'//')[1]
if find(domain,mainHost) >= 0:
req.set('portal_skin','MainHostSkin')
context.setupCurrentSkin(req)
This works perfectly for me and the situations I'm currently
running into. Thanks again to Tim.
~C
Carl E. Rendell
Solution43
Information Distribution Consulting | "Ahhhh the power of
cer@sol43.com | acquisition" - Chef Z