littled.net

Web design & development; online and offline ramblings

Lorem

Fun with Plone 3: stage 2

March 20th, 2008 · No Comments

Right, now the instance has been set up I can set up a test theme package. I cd to the src directory created during my buildout, i.e. littled/src.

This is where I’m going to create my theme product:

$ paster create -t plone3_theme littled.theme

I use these details:

  • Namespace package: littled
  • Package: theme
  • Skinname: Littled theme
  • Skinbase: ‘Plone Default’ (default option)
  • Enter empty styles: True (default option)
  • Enter include_doc: False (default option)
  • Enter zope2product: True (default option)
  • My name, email address and website URL
  • Licence name: GPL (default)
  • Zip_safe: False (default)

Now I edit my buildout.cfg file at littled/buildout.cfg and the following lines of code:

[buildout]
…
develop =
 src/littled.theme
eggs =
 …
 littled.theme

Now, I re-run buildout in offline mode to put the changes into effect. I cd to the littled/bin directory:

$ /Applications/Plone-3.0.6/Python-2.4.4/bin/python ./buildout -o

I now need to make sure my theme package is detected by Zope. To do this, I create a ZCML “slug” in the littled/parts/etc/package-includes directory called “littled.theme-configure.zcml”:

<include package="littled.theme" file="configure.zcml" />

Restart Zope with the bin/instance command:

littled/bin/instance stop
littled/bin/instance start

I’ve just been reading through Martin Aspeli’s book and he says to add something along the following lines to the buildout.cfg file which does the same thing (I haven’t tested this but don’t have any reason to assume it won’t work!):

[instance]
zcml =
littled.theme

I look in the ZMI and see littled.theme listed in the available products in the Control Panel. “Littled theme” is available as an extension profile when creating a new Plone site.

If I go into portal_skins I can see the following skin folders:

  • littled_theme_custom_images
  • littled_theme_custom_templates
  • littled_theme_styles

Screenshot of ZMI showing theme skin layers in ZMI

This is looking promising….

Tags: plone · plone-themes · plone3

0 responses so far ↓

  • There are no comments yet...Kick things off by filling out the form below.

Leave a Comment