Personal tools
You are here: Home Documentation Tutorials Switching Skins Intervening to Switch a Skin
Support

Get Help

Join our chat rooms or support forums if you have more specific questions.

Plone Training
Learn how to design, build, and deploy a website in Plone through one of the numerous Plone training sessions around the world.
Find Plone training…
 
Document Actions

Intervening to Switch a Skin

A summary of the main ways you can intervene in Plone's skin-choosing process, to switch a skin.

George Lee

This Tutorial describes how Plone chooses a skin when you open a web page, and then describes the multiple ways that you can intervene to switch the skin. The Tutorial also discusses two common use cases, switching skins based on URL and the type of user (e.g., Anonymous or Authenticated).
Page 3 of 8.

With all these variables and steps, you can intervene to switch the skin in many different ways. (In the below list, sibling items represent different alternatives.)

  • (1) Encode a skin in the SKINDATA variable ...
    • (1A) Call object.changeSkin('mySkin').
    • (1B) Manually modify the SKINDATA variable.
  • (2) Add a 'portal_skin' property to the REQUEST object ...
    • (2A) Add a cookie 'portal_skin' ...
      • (2B.i) On the user's personal preferences page, update the 'portal_skin' property (which autoamtically creates the cookie). In order to enable this, you must enable an option on the portal_skins tool using the Properties tab in the ZMI.
      • (2B.ii) Update the user's 'portal_skin' property manually, then manually call portal_skins.updateSkinCookie(). It is not necessary to enable the ZMI option to change the 'portal_skin' property with Python code outside of the personal preferences page.
      • (2B.iii) Create a cookie manually.
    • (2B) Add 'portal_skin' as a simple string attribute.
  • (3) Set the default skin in the portal_skins tool, using the Properties tab in the ZMI.
 
by George Lee last modified October 21, 2006 - 19:57 All content is copyright Plone Foundation and the individual contributors.

For any issues with the web site functionality, please file a ticket.

Please consult the policy on plone.org content if you want your content published on this site.

Servers and hosting by