Getting Started - The Manual Way
davconvent
- Uninstall the product (with the Portal Quick Installer) before modifying anything.
- Rename the product to something other than
DIYPloneStyle(1). This must be done on the filesystem, not in the ZMI (don't laugh, it happened). - Rename
skins/diystyle_base_styles/diystylesheet.css.dtmlto something that suits better your product name.
This file is where you will add your own CSS rules. - Rename all the folders which name starts with
diystyle_basein theskins/directory to something that suits better your product name (2). - In config.py, change the name of your skin selection by modifying the
namevalue of the first entry inSKINSELECTIONS(3). If your product won't provide more than one skin selection, you can remove thelayerskey from that entry (make sureSKINSELECTIONSmatch folder names in your skins directory).
ChangeDEFAULTSKINto make it use the name of your skin selection.
In theSTYLESHEETSdeclaration, replacediystylesheet.cssby the name you chose for that template, omitting the.dtmlsuffix. - In Extensions/Install.py, edit the relevant lines in the import
declarations (see
# CHANGEcomments). - In tests/testStyleInstallation.py, replace all occurences of
DIYPloneStyleby the name of your product (see# CHANGEcomment). - Edit README.txt, give it another description, remove the usage
and credits paragraphs, and replace author names and email addresses.
If you plan to distribute your work, please leave a note stating that it is based on DIYPloneStyle. - Clear HISTORY.txt from its DIYPloneStyle related content.
- Remove the basic example
- Remove all the files which name starts with
diystyle_examplein theskins/directory. - In config.py, in the
SKINSELECTIONSdeclaration, remove the lines declaring theDIY Style Exampleskin.
- Remove all the files which name starts with
- Remove the bin/ folder as the script it contains only works on a clean, left unmolested version of DIYPloneStyle.
That's it!
Now you can test the initial state of your visual theme by restarting the Zope
server and installing it from the Site Setup > Add/Remove Products page
(as manager, in the Plone interface).
Your Plone Site should now look like this:
Now have fun with your new project!
- Troubleshooting
- This part of the tutorial is likely to be the one that will put you into
some trouble.
See the Troubleshooting section of this tutorial if you feel that you are in a desperate situation.
(1) It is safer to work with a copy of the product so that it's easy to compare with the original version if you feel like in trouble. back
(2) Unless you configured it otherwise in the config.py module, any folder
located in the skins/ directory of your product will be registered as an
FSDirectoryView with the portal skins tool.
Because FSDirectoryViews must have a unique name/id in the skins tool,
good practice is to include your product name into folder names to ensure
these don't clash - particularly when using a name that might be commonly
used.
back
(3) In versions prior to 1.0.3, the name of the skin selection is setup
using the SKINNAME variable. back
DIYPloneStyle now uses a GenericSetup profile
From Plone 2.5 on, it is recommended to use a GenericSetup profile for third party products installation, instead of installing from an Install python external method.
What used to be set in 'config.py' (and read by the install method) is now set in the GenericSetup XML files located in the 'MyTheme/profiles/default/' directory on the file system. For instance, 'portal_skins' settings can be changed in 'skins.xml', Stylesheets registry settings are made in 'cssregistry.xml', etc.
All the XML files contained in the DIYPloneStyle basic skeleton contain inline documentation to help you find your way when customizing the theme related settings of a Plone portal.
Where is config.py?
Am I missing something?