Attention

This document was written for an unsupported version of Plone, Plone 2.5.x, and was last updated 1605 days ago.

For more information, see the version support policy.

To learn how to upgrade to the current version of Plone, read the upgrade manual.

Intervening to Switch a Skin

by George Lee last modified Dec 30, 2008 03:05 PM
A summary of the main ways you can intervene in Plone's skin-choosing process, to switch a skin.

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.

Contribute

Something wrong or out of date? Anybody can edit or create a new article in the knowledge base. Simply create an account on this site, log in, and click the Edit button to contribute.