[Zope-CMF] Forcing Skin changes

Parish, Yoav yoav.parish@imes.mavt.ethz.ch
Fri, 31 Aug 2001 19:35:55 +0200


Hello everybody,

a while ago I asked on the list how to enforce a skin change. Thank you
for the answers, I only found the time now to implement this into the
site. But still there are large problems with doing this. Here is what I
did:

On the page, there is e.g. a link "SkinRed" or "SkinBlue". The link
calls the following DTMLMethod:

<dtml-call expr=3D"REQUEST.set('portal_skin','SkinRed')">
<dtml-call "RESPONSE.setCookie('portal_skin','SkinRed',path=3D'/')">
<dtml-call expr=3D"portal_skins.updateSkinCookie()">
<dtml-call
expr=3D"REQUEST['RESPONSE'].redirect(portal_url()+'?portal_status_message=
=3D
Skin+changed.')">

Now, this works, but unfortunately not completely correct. The
index_html of the respective skin will be displayed, but for example
gifs that have the same name in both skins will not be changed
correctly, the same thing with the css. Sometimes pushing the reload
button helps, sometimes not.=20

Another interesting behavior is that when i push the link SkinRed twice,
the first time it will change to that partial SkinRed described above,
but the second time the link is clicked, it will switch back to the
SkinBlue (or another skin).=20

Could anyone help me out on this problem?

=20

thank you very much

yp