Aug 21

Features in Plone 3.0


Apr 08

One of the most challenging things as a web-developer is cross platform consistency with CSS… namely IE never plays nice with anyone else.

I just finished a Plone site for, an NGO at the United Nations. The design was simple except for getting the look of the javascript rollovers buttons right and the fact that they were positioned under Plone Live Search Results.

To get the JavaScript rollovers working I used:

It was well documented and worked perfect “out of the box” on a stock plone site. Thank you Paulo Lopes.

I needed the folder tabs under the Live Search and it would display in behind the tabs. I did a lot of hacking around and with the help of Paulo we were able to come up with some CSS that works for IE6 and below.

#portal-searchbox {
display/**/:block;/*sorry for IE5*/
position:absolute;/*must have*/
z-index:10;/*must have*/
margin-left:-15px !important;

#portal-searchbox .LSBox {

.imageBoxRight, .imageBoxLeft {
font-size: 0.7em;

Hope that helps you!

Mar 13

Most of the time when I skin a Plone site for a client they want to clear out all of Plone’s stock portlets and only display ones that they can manage the content of. I quite often use the SimplePortlet Product to achieve this. It is simple, stable, and user friendly.

With SimplePortlet not every page has to have a portlet, you can define it with a boolean True or False checkbox. One feature that SimplePortlet does not have is the ability to hide the left or the right slots if there is no portlet to be displayed. I found a way to do this with one small change:

In the find the block that starts with <tal:comment replace=”nothing”> Start of left column </tal:comment> mine is around line 108.

Change this:

<td id=”portal-column-one”

To this:

<td id=”portal-column-one”
tal:condition=”python:here.portlet_manager.getPortlets(here, ‘columnOne’)”>

Scan down and locate <tal:comment replace=”nothing”> Start of right column </tal:comment>

Change this:

<td id=”portal-column-two”

To this:

<td id=”portal-column-two”
tal:condition=”python:here.portlet_manager.getPortlets(here, ‘columnTwo’)”>

I belive the sl and sr checks for if there are portlets for ‘slot left’ and ‘slot right’ respectively. If you plan to use this with other portlets you may want to put boolean ‘or’ in there.

btw: I am in NO WAY LIABLE for ANY DAMAGE you might do to your Instance by messing around with the things I describe here. Always backup!

Mar 12

Recently I have been skinning or customizing the look of some Plone sites. I was looking for a template or shell of a some sort that I could download, drop in everything from my zmi’s /site_id/portal_skins/custom and it would look the same. I found nothing till a friend came to my aid. I thought I would pass that information onto anyone interested.

1) Download the shell product here:

2) Optional: Rename DIY to the anything you want. For example, I just did a site for the Baha’i International Community in the United Nations, so it was BICDesign. Make sure you are consistent with the case ( as in upper and lower).

3) Move all your files out the ZMI into the right dir:
a) Move all the CSS files or scripts that you have created into ./DIYDesign/skins/diydesign.
b) Move all your images for your skin into ./DIYDesign/skins/diydesign_images
c) Move any files that you have over-ridden into ./DIYDesign/skins/diydesign_overrides. For example, I added some text to the so that goes into the diydesign_overrides folder.

4) Move DIYDesign folder into your Products folder. Make sure to check the permissions and owner (common trip up).

5) Restart the ZMI and install the DYIProduct into your site via the portal_quickinstaller or the ‘Add/Remove Products’ in the ‘Site Setup’ admin section.

6) Go to the ‘Site Setup’, ‘Skins’ and choose your new skin and refresh the site. If your new skin does not show up you may have to add any css files through the /site_id/portal_css/ form in the zmi.

If you need any help just post a comment and I’ll try to help. Hope that helps!

Kamran Kazempour

Mar 01

I have recently been working on a Plone site for a group in the United Nations. I had worked on the site about a two weeks with a couple of 23 hours runs. Most of the time was spent getting the CSS for IE and IE7 to look like the mockup whereas Firefox and Safari took right away.

After the site was done and ready to turn over to the client, I made a backup and did one final restart on ZMI via the Plone-2.5.2/zeocluster/bin/ script. When the ZMI came back up, it had lost all the changes I had made in the last two weeks. Most things were saved as they were in a Plone product and not in the ZMI with the exception of the IE CSS files, so they were lost :( .

I thought my data.fs was corrupted or not readable. So, I downloaded a hex editor for Mac OS X Hex Fiend and opened up my backed up data.fs. When reading the data.fs file, the trick is to scan backwards because the file is being appended to. I was looking for any CSS class name that was in my IE css files.. so I found nothing.

After scanning the event.log I noticed the line ConflictError: database conflict error . So, my zodb was not being written to from that point on. Everything was being held in ram on the server and not being written to the zodb. I restarted the ZMI lots of times throughout the development of this site, but I did it through the Control Panel in the root of the ZMI. Using the script is a ‘deeper restart’, so that is when I realized that I lost everything.

After that, yesterday, I created a new Plone instance and decided to restart the instance via the script. Again, I lost my one change. I reinstalled Plone and everything is working now.

Feb 12

My good friend Jim Roepcke showed me how to use the Plone debugger and it already saved me a ton of time! Here is a really brief howto:

Start your zope instance in the foreground like this:

/path/to/zope/instance/bin/zopectl fg

in your code:

import pdb

then anywhere you want the program to break add this line


You can find more information here:

Well worth checking out!

Thanks Jim!