Archive for the ‘plone3’ Category

Review of Plone 3 Theming by Veda Williams

Sunday, September 27th, 2009

Plone 3 theming

Veda Williams‘ Plone 3 Theming (Packt, 2009) [Amazon UK | Amazon US | Packt] is a useful reference for anyone involved in customising the look and feel of their Plone-based website. Used alongside the various online resources on the plone.org website, particularly the Plone Theme Reference,  it should ease  most of the pain that Plone themers experience. Unfortunately (and this is not a criticism of the author), the book is let down by some poor copy-editing. It also contains a number of errata, which the author is gathering on the plone.org website.

The book is broken down into fifteen chapters, the most useful of which I found were chapters seven to twelve which deal with the day-to-day business of Plone theming.  These chapters cover customising viewlets and portlets, an overview of the Zope templating language ( ZPT), the creation and installation of a Plone theme, template changes, custom page views and theming tips. Although I’ve done a fair amount of Plone theming, I still find it quite esoteric and complex so it’s certainly very useful to have these chapters to refer back to.

Chapter fifteen, written by Alex Limi, gives an overview of the future of Plone theming using products such as collective.xdv and Deliverance. These seem an ultimately saner way to proceed and should allow non-Plone specialists to theme a site without getting too bogged down in Plone specifics. This article is also freely available on the Plone website where it will be updated as the project develops.

I did wonder if the second chapter was really necessary — this provides an overview of the main graphic design, browser and text editing tools. I imagine that most web designers and developers already know about these and the complete beginner would be encouraged to to stay away from Plone until they are a little more experienced.

That aside, the only real complaint I have about the book is the quality of the copy-editing. I think the text would in places benefit from a little slimming down or rephrasing. I occasionally struggled with some of the explanations , although it must be borne in mind that Plone 3 theming is complex so is by its very nature difficult to explain in simple terms. Some other examples: it’s probably not necessary to have sentences like, “now what, you ask?” in a tutorial book and I’m not sure why there is a lengthy code sample from Plone 2 on pages 129-30 which is really only produced to show how things were done the “old way”.

Anyone who has been involved in Plone theming will know how hard Veda Williams has worked on it: in addition to this book, she coordinated the Out of the Box Plone Themes project. For her work I’m sure she has the gratitude of every Plone themer. Hopefully subsequent editions of the book will address the editorial issues and errata.

Fancy helping with plonetheme.hamnavoe?

Friday, April 10th, 2009

Hamnavoe is one of my contributions to the Out of the Box Plone Themes project and has had almost 500 downloads since its release last October.

I’ve been meaning to do some minor fixes (mainly CSS) on it for a while now but am too bogged down with other things to be able to give it any time.

So … this could be where you come in. If you’re a budding Plone themer and would like to have a poke around with an existing Plone 3 theme before starting on your own, then this could be an opportunity for you to help out. It’s for the community (i.e. it’s not my own private project!), so the reward would really just be in doing it (and getting your name in the documentation obviously).

Ok, so don’t all rush at once. But, seriously, if you’re interested, drop me an email at my Gmail address: d.little1971 (at gmail.com) or send me a Tweet: @djlittle.

Plone theming: some minor annoyances and victories

Saturday, January 17th, 2009

I’ve started work in earnest on theming a Plone 3 site this week and have come up against some minor annoyances. But, this was balanced out by some of the cool things I learned too.

Portlets.xml

One of the great things about generic setup is that you can configure your site through the web and then export your settings as a series of xml files to your filesystem theme product. However, configuring my portlets and then exporting the resulting portlets.xml file caused some problems when re-installing the product.

I’d customised my navigation following the steps outlined in the article Customising navigation in Plone 3. This was fine. But when I re-installed my theme product containing an exported portlets.xml file I got a “ConstraintNotSatisfied” error. I didn’t get very far with finding a solution to this on Google, but by trial and error found out that this disappeared if I removed the following from the <assignment name=”navigation” …/> directive:

<property name=”name” />
<property name=”bottomlevel”/>
<property name=”root” />

Secondly, default portlets (login, news, recent etc.) I’d removed via “manage portlets” weren’t reflected in my portlets.xml file so I had to enter this manually into my portlets.xml file:

<assignment remove=”true” name=”login” category=”context” key=”/”
manager=”plone.leftcolumn” type=”portlets.Login” />
<assignment remove=”true” name=”calendar” category=”context” key=”/”
manager=”plone.rightcolumn” type=”portlets.Calendar” />
<assignment remove=”true” name=”events” category=”context” key=”/”
manager=”plone.rightcolumn” type=”portlets.Events” />
<assignment remove=”true” name=”news” category=”context” key=”/”
manager=”plone.rightcolumn” type=”portlets.News” />
<assignment remove=”true” name=”recent-items” category=”context” key=”/”
manager=”plone.rightcolumn” type=”portlets.recent” />
<assignment remove=”true” name=”review-list” category=”context” key=”/”
manager=”plone.rightcolumn” type=”portlets.review” />

CSS Registry

To ensure that the order of CSS files in the CSS Registry was honoured I had to enable the auto grouping property (which didn’t exist in Plone 2.5.3). In the cssregistry.xml you can set this via:

<object name=”portal_css” meta_type=”Stylesheets Registry” autogroup=”True”> … </object>

The order seemed to go a bit haywire again if I enabled debug mode in the CSS Registry.

More positive things

It’s pretty straightforward to override viewlets for different content types. For instance, I didn’t want the breadcrumb trail to appear on my home page. In my browser/configure.zcml I simply added this directive:

<browser:viewlet
name=”bbkschool.path_bar”
manager=”plone.app.layout.viewlets.interfaces.IContentViews”
for=”Products.BBKHomePage.interfaces.IBBKHomePage”
layer=”.interfaces.IThemeSpecific”
template=”nopath_bar.pt”
permission=”zope2.View” />

In the “for” attribute I specify the interface of the content type I want this to apply to. The template, “nopath_bar.pt” is simply an empty template in my browser directory.

Lastly, Gloworm came in really handy as did plone.reload (although I found this a little unpredictable at times).