Enable theme transformation
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.
