Plone 3 Themes
Uninstalling Your Theme
From time to time you'll need to remove your theme from your Plone site through the Add-on Products page os Site Setup. This is most likely to occur when you've made wholesale changes to stylesheets and Plone simply doesn't see the changes, ie. something's got wedged inside Plone.
If we don't uninstall then Plone has a bad habit of not re-reading the them from the filesystem.
profile.zcml
We need to tell Plone about the existence of our uninstall "profile". Edit profile.zcml and add:
<!-- The name of the uninstall profile must be alphabetically after the install profile --> <genericsetup:registerProfile name="uninstall" title="Uninstall My Plone 3 Theme" directory="profiles/uninstall" description='Uninstall Information for the "My Plone 3 Theme" Plone theme.' provides="Products.GenericSetup.interfaces.EXTENSION" />
where they key bits are name="uninstall" and directory="profiles/uninstall".
As the comment says, the uninstall profile my be alphabetically after the install profile which you'll see is called default.
profiles/uninstall
Create a directory, profiles/uninstall and add two files:
metadata.xml
This should have the contents:
<?xml version="1.0"?> <metadata> <version>1.0</version> </metadata>
where 1.0 should match the version number of your theme (which you set when you created the theme).
skins.xml
This should have the contents:
<?xml version="1.0"?> <object name="portal_skins" allow_any="False" cookie_persistence="False" default_skin="Plone Default"> <skin-path name="My Plone 3 Theme" remove="True" /> <object name="plonetheme_mytheme_custom_images" remove="True "/> <object name="plonetheme_mytheme_styles" remove="True "/> <object name="plonetheme_mytheme_custom_templates" remove="True "/> </object>
You'll notice that those three names, plonetheme_mytheme_ match the subdirectories in .../skins.
You'll also note (and see later) that these directories appear in portal_skins in the ZMI when the theme has been installed. You should check, therefore, that they disappear when you uninstall your theme!
Warning
It is best if you change your theme away from you own to Plone default, say, before uninstalling your theme!
Document Actions