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:
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:
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:
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).






















3 responses so far ↓
1 David // Jan 18, 2009 at 10:08 am
Oops. There was a slight typo in this post which has now been corrected.
2 David // Jan 18, 2009 at 10:10 am
Well, that was useful. That should have read:
<navigation assignment=”navigation” …/>
has been changed to:
<assignment name=”navigation” …/>
3 David // May 28, 2009 at 3:51 pm
From Thomas Graf (via email) — Thanks Thomas!
The ConstraintNotSatisfied-error you describe in the Portlets.xml section occurs only if you set the option without an value.
e.g. <property name=”bottomLevel”>0</property>
works well after adding the value “0″.
Leave a Comment