Attention

This document was written for an unsupported version of Plone, Plone 2.5.x, and was last updated 1140 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.

Organizing the skins layers

by David Convent last modified Apr 09, 2009 01:58 PM
A bit of theory on the portal_skins tool mechanism.
To better understand how the *Skins Tool* and its layers traversal work, I invite you to read the paragraphs about "Using Layers Within a Skin":http://docs.neuroinf.de/PloneBook/ch7.rst#using-layers-within-a-skin and "Managing Skins with the portal_skins Tool":http://docs.neuroinf.de/PloneBook/ch7.rst#managing-skins-with-the-portal-skins-tool in the "chapter 7":http://docs.neuroinf.de/PloneBook/ch7.rst of the official "Plone Book":http://docs.neuroinf.de/PloneBook by Andy McKay. The links are unofficials but they are the only public ones I know that deliver a rendered HTML version of the book, and they are up-to-date. These paragraphs cover TTW Plone customization. Although it is a good way for learning the *Skins Tool* layers traversal mechanism, we know that working in the ZMI is not the best approach when it comes to building a full graphical environment for Plone. When building a skin product on the filesystem, concepts are the same:
The install function first creates a skin selection containing the layers of the skin it is based on, then adds the product specific layers to it. On the filesystem, the product specific layers are the folders that are located in the product 'skins/' directory (*). In practice, if your product is built for customizing a Plone site by adding a few stylesheets and replacing graphical UI elements (images like the logo and some icons), you won't need to have much more than one layer to add to your skin selection (**). But there are situations where it might be useful to have several layers, mainly for organizing skin elements into categories (images, customizations, stylesheets, etc). (*) Any folder located in the 'skins/' directory of your product will be registered as an FSDirectoryView with the portal *Skins Tool*, and then be added to your skin selection layers. Exceptions are folders which name starts with '.' or equals 'CVS' or '{arch}' (This is hardcoded in *Products.DIYPloneStyle.Extensions.utils.getSkinsFolderNames()*). (**) If DIYPloneStyle provides more than one skin layer (if its 'skins/' folder contains more than one folder), it's only for making easier the example removal part of the *Get Started* process.

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.