Attention

This document was written for an old version of Plone, Plone 3, and was last updated 926 days ago.

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

Enable theme transformation

by Denys Mishunov last modified Nov 08, 2009 07:39 PM
Take a look at how to make your Plone site work with theme transformations

When you have collective.xdv installed in your site you get a new configuration in the Plone control panel called “Theme transform”. This is where you control your transformations.

To start transformation work you have to specify a path to your theme’s static HTML page (index.html) and rules file (rules.xml). File names don’t really matter but usually it’s a good idea to follow general conventions. The “Theme template” and “Rules file” configuration fields are responsible for specifying these. Both of them accept a relative path to the corresponding files. The paths start at buildout’s top folder not your theme’s top folder.

In the theme's root folder we create rules.xml file with the following code:

<?xml version="1.0" encoding="UTF-8"?>
<rules xmlns="http://openplans.org/deliverance">

</rules>

index.html file has been put into skins/xdvtheme_xdvrocks_custom_templates/ when we copied our static theme to the Plone theme. Thus in the “Theme transform” configuration in the “Theme template” field we put

src/xdvtheme.xdvrocks/xdvtheme/xdvrocks/skins/xdvtheme_xdvrocks_custom_templates/index.html

And in the “Rules file” field we add

src/xdvtheme.xdvrocks/xdvtheme/xdvrocks/rules.xml

After you have added these paths you should explicitly enable theme transformations since collective.xdv is disabled by default when you install it. So select “yes” in “Enabled” field and save the configuration.

Since our rules.xml doesn't contain any rule yet you should now see your site rendering the un-styled HMTL of your static theme - even without your theme’s images. We will fix this in a moment. But to do this we should understand what rules we have available and what those rules do.


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.