Skip to content. | Skip to navigation

Sections
Personal tools

Plone Product Howto

An easy way to create a Plone Product

Customizing a Plone instance via the ZMI is easy but tedious. The ‘smart’ way to do it is filesystem based (just like you would do with any other system but Zope!). The most elegant way to achieve that is to write a Custom Product. This has the advantage that your work is now much more portable and distributable: copy it into the Product folder of a Zope instance, restart it and presto! - you can install your customizations from within the Plone Control Panel!

Overview

What is it?

One word: convenience. This script generates a ready-to-install skin in form of a Product for Plone 2.1 - all you need to do is supply the name of your new skin and the location of your Products folder, that's it! No more copy & pasting from tutorials, as all necessary code is generated for you and you can dive right into your actual work ;-)

License

Licensed under the FreeBSD License i.e. do whatever you like but a) keep this notice with your version and b) don't sue me ;-)

Author

Hacked together by Tom Lazar, tomster.org, feedback welcome at tom@tomster.org

Download

You can download the current version (0.2) here.


Installation

  • Unpack the archive anywhere you like and cd into the resulting directory

  • call createPloneSkin.py <SkinName> <ProductDir> where ideally, ProductDir should point to the Product folder of a Zope installation which already has Plone installed - in this case the script will copy the most common templates into the new skin for your convenience.

  • (re-)start your Zope instance

  • visit http://yourplonesite/prefs_install_products_form and install your skin

  • visit http://yourplonesite/prefs_portalskin_form and select your new skin as default

  • now, of course, you'll have to start modifying the templates to actually make any changes to your site... You'll find them inside your Products at skins/custom-XXX where XXX is the name of your skin/product.

Details

Skin folders

Untouched, the script installs and registers five skin folders - because, that's the way I do things ;-) This option is configurable from config.py and works thus:

for each entry in skinFolders one sub-directory inside the skins folder is created and inserted into the paths of the skin after the name of the skin has been appended. The latter is done to ensure that there isn't any conflict with existing paths (such as the default custom path).

the custom-skinName path is where you should keep all the Plone templates that you customize. This is also where you'll find the default customizations that the script copies for you.

the images folder should be self-explanatory - I simply don't like all those images to clutter up my template folders...

the public folder is where you can put all of your own templates.

Skin paths

Using the clever code from the MySite product, the above mentioned paths are automatically inserted upon installation (and removed again after de-installing the skin).

Tabs

Tired of endlessly creating portal tabs in the ZMI but don't want to use Plone 2.1 feature of automatically creating tabs from top-level folders? Simply edit the line TABS = [("index_html", "Home", "string:$portal_url/"),] inside boilerplate.py. If, however, you do want to let Plone create the tabs automatically, you will probably want to change that line to TABS = [(),] `

Further Reading

To further familiarize yourself with the development of skins I suggest you read the how-to at plone.org - except, that now you can skip the entire first section entitled Basic Setup ;-)

Outdated Information
Please note that most of the information contained in this section is several years old and while most of it is still useful, hardly none of it applies directly to current versions of the software discussed. Proceed with caution, your mileage may vary etc. pp. ;-)