[Zope-CMF] Forcing skins by role

sean.upton@uniontrib.com sean.upton@uniontrib.com
Fri, 23 Aug 2002 08:57:37 -0700


hmm... Does anyone know if there are problems/changes in CMF 1.3 from 1.3b2
related to setting a skin this way?  I seemed to have a problem like this
when I set up a new CMF 1.3 setup and copied source for a rule from an old
(an access rule that worked on CMF 1.3b2 not working on a CMF 1.3 site,
running on Zope 2.6a)...

Sean

-----Original Message-----
From: Shane Hathaway [mailto:shane@zope.com]
Sent: Friday, August 23, 2002 6:44 AM
To: Paul Winkler
Cc: zope-cmf@zope.org
Subject: Re: [Zope-CMF] Forcing skins by role


Paul Winkler wrote:
> I'd like users to a CMF site I'm working on to
> see one of two skins, based on whether or not the user has
> a role.
> (snip) 
> 
> who = context.portal_membership.getAuthenticatedMember()
> if who.hasRole(context, ['Manager']):
>    newskin = 'Skin A'
> else:
>    newskin = 'Skin B'
> REQUEST.set('portal_skin', newskin)
> context.setupCurrentSkin(REQUEST)

Try updating to the current CMF CVS and changing the last two lines to 
the following:

context.changeSkin(newskin)

It was just added this week.

Shane


_______________________________________________
Zope-CMF maillist  -  Zope-CMF@zope.org
http://lists.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests