Introducing Plone

Reuven M. Lerner

Issue #109, May 2003

Is Plone the killer app that will bring Zope-based content management to the masses?

One of the biggest reasons for the success of the Apple II computer in the late 1970s was not a product of Apple Computer, Inc. Rather, the first spreadsheet, VisiCalc, written by Dan Bricklin and Bob Frankston, helped propel sales of the Apple II. VisiCalc was a revolutionary product, and it worked only on Apple computers. Businesses everywhere began to buy Apple computers, simply so they could have VisiCalc.

It turns out that Bricklin and Frankston hadn't invented only the spreadsheet. They also had invented the killer app—an application that makes a platform so compelling, people adopt the platform for that one product. Every platform vendor hopes someone will produce a killer app for its product, driving up sales of the platform technology as more and more people want it for themselves. Things are not much different in the Open Source world, although different motivators exist. For example, many people have adopted Linux in order to use Apache or Python to work with Zope.

The latest example of a killer app in the Open Source world is Plone, a content management system (CMS) written on top of Zope by Alexander Limi, Alan Runyan and Vidar Andersen. Plone has become an increasingly prominent piece of software in recent months and has brought many people into the Zope community. And although many Plone users seem to stay within that world and don't venture into the depths of the Zope server, Plone may well be the killer app for Zope. If true, this would be a fascinating trend, given how Zope has long been considered the killer app for the Python language.

What Is Plone?

Plone is a simple CMS that allows a site administrator to grant different privileges to different users. All users can read publicly available content. Some users are allowed to enter new content, and other users are allowed to publish that content to the general public. Indeed, the distinction between available and published content is what most distinguishes a CMS from a run-of-the-mill web site.

In contrast with a static web site, where files are available to the public as soon as they exist in the root document directory, a CMS allows you to expose content selectively. Moreover, a CMS allows you to retract previously published content. So if your site publishes a news story that turns out to be false, you can remove it from the public's view without actually having to remove any files. A log of when the story was written, published and retracted, along with who performed each action and the reason why, is available to site administrators at all times.

Plone is not designed to be the be-all and end-all of content management systems. Rather, it is meant to be used on small- and medium-sized web sites whose administrators want to provide a variety of useful features, prefer a nice user interface and need the ability to customize the site's look and feel to a certain degree.

Plone itself is implemented as a number of different Zope products, where each product is actually an object class that can be instantiated multiple times. However, Plone is not implemented directly in Zope but within Zope's content management framework (CMF), a set of objects and APIs meant to make it easy to create your own CMS.

Plone 1.0 was released prior to this writing, in early 2003, and depends on CMF v1.3, which was released in mid-2002. Just as a desktop application uses many of the facilities that the underlying operating system provides, Plone, or any CMF-based CMS, uses the capabilities that the CMF provides. Plone sites thus offer full-text search and the ability for community members to comment on any content object. As the CMF improves and offers more services, I expect Plone also will improve.

Installing Plone

If you already are running Zope, installing Plone is quite easy. Remember that every Zope product must be installed in the lib/python/Products directory within your Zope directory. In addition, Zope must be restarted either manually or from the web-based control panel in order for newly installed products to be seen and registered.

Before you can install Plone, you must install the latest version of the CMF. Retrieve CMF-1.3 from cmf.zope.org, which comes as a gzipped tar file. I put the tar file in /tmp and installed it as follows:

# cd $ZOPE/lib/python/Products
# tar -zxvf /tmp/CMF-1.3.tar.gz

The CMF-1.3 directory created in lib/python/Products contains a number of CMF-related products that Zope needs to locate at startup. We therefore create a number of symbolic links to the product directories:

# ln CMF-1.3/CMFCore .
# ln CMF-1.3/CMFCalendar .
# ln CMF-1.3/CMFDefault .
# ln CMF-1.3/CMFTopic .
Now that the CMF is installed, we can install Plone as well. Retrieve a tar file of Plone from www.plone.org, place it in /tmp and expand it:
# cd $ZOPE/lib/python/Products
# tar -zxvf /tmp/CMFPlone-1.0.tar.gz
As with the core CMF product, you must create several symbolic links in the Products directory, so Zope can recognize them when it starts up:
# ln -s CMFPlone-1.0/CMFPlone .
# ln -s CMFPlone-1.0/DCWorkflow .
# ln -s CMFPlone-1.0/Formulator .
If you are using a version of Zope prior to 2.6.x, you might need to create a symbolic link from another product to the main Products directory. Check the Plone instructions to be sure.

Make sure the CMF-1.3 and CMFPlone directories and their contents are owned by the same user as the one as which Zope runs. This is normally a user named www or zope. Running Zope as nobody, which used to be considered a safe option, is no longer recommended. If the appropriate user does not own the files, you could encounter some odd ownership and permission problems.

Now you have installed everything you need to create a site managed by Plone. Start Zope, log in as a user with administrative privileges and you're ready to go.

Creating a Plone Site

Creating a Plone site is extremely easy from within the web-based Zope management interface. From the add product menu, choose the Plone site. You will be prompted to enter several pieces of information:

  • the ID of the site, which will be part of the URL;

  • the title of the site, which will appear at the top of each page;

  • whether the site should have its own user folder or should inherit users from the surrounding Zope site;

  • a description of the site; and

  • the type of site you're creating (for now, leave it at the default Plone).

When Zope finishes creating a new instance of the Plone site, the large pane in the Zope management interface changes dramatically. An introductory message appears in the middle, a toolbar slides across the top, and information, including a calendar, shows up in rectangles along the left and right sides.

The interface for modifying a Plone site is significantly different from the standard Zope interface. Whereas Zope normally displays the same screens for all users and only presents the management interface when the /manage method call is tacked onto a URL, Plone modifies its output according to the current user's permissions. So although guests can navigate only through the site's content, administrators are shown tabs, such as view, edit, properties and state, and can see all items on the site, including those not yet published.

Luckily, the Plone user interface is fairly straightforward for administrators. To modify the contents of a page, click on the edit tab. You can then edit the content, including its URL and summary information, using your web browser. The summary information appears in search results. Plone uses JavaScript to make the user interface easier to understand for nontechnical users; for example, clicking on any HTML widget, such as a text area or radio button, in the Plone editing interface brings up a tooltip-like description of what should be inserted.

Content added or modified using the web-based Plone interface can be in plain text, in HTML or in Zope's structured text format, which uses punctuation and indentation as formatting mechanisms. I prefer to use structured text as often as possible, using HTML only when I want to format a page in a way that structured text doesn't allow.

Surrounding the main document on a page are multiple portlets, accessories that add to a site's content. Plone comes with several portlets by default, including a list of news stories, a list of events, a calendar that displays today's date and highlights any events during the current month and a list of relevant documents on the current site.

To add a new document, first move to the contents view by clicking on that link in the navigation portlet. This produces a list of documents in the current folder. You then can select a new content type from the add new item in the upper-left corner. It's important to realize a new document is created as soon as you click on add new document; following that, you are modifying its properties and content.

By default, Plone allows you to create a number of different content types:

  • Folders allow you to structure your site with a hierarchy. Just as a disk, static web site or Zope site contains files in folders, Plone sites can contain folders. The title of each published folder is displayed in the navigation portlet.

  • Documents are the most common item on Plone sites and can be formatted in HTML, structured text or plain text. Most of the time, you probably will want to create a new document.

  • Images can be in nearly any format, including JPEG, PNG and GIF.

  • Files are items you want users to be able to view or download but that don't have a MIME content type that Plone can work with easily. Some examples are QuickTime movies, audio clips and Microsoft Office documents.

  • Events are short documents with a starting and ending date and are highlighted in the calendar portlet.

  • News items are short documents displayed in the news portlet. This is a good and easy way to publish press releases, for example.

Plone also comes with links, which are URLs of interest to the outside world, and topics, which are predefined searches within the site. An increasing number of other content types are emerging for Plone, such as a weblog and a photo album.

Publishing Documents

When you create a new piece of content in Plone, it is in the visible state by default. This means that if people know the URL, they can get to your document with their web browsers. The content does not appear, however, in searches or in the navigation portlet.

To publish content, click on the state tab at the top of the page. (From the contents view, you can publish multiple pieces of content simultaneously with the state button at the bottom of the page.) This brings you to a page that asks when the content should first be published, when it should expire and any comments you wish to make about the decision to publish the document. The dates you enter are the final arbiter, meaning that a published document will be visible only between its starting and ending dates. This allows you to enter content days or weeks before it should be exposed to the general public, without having to change its state to published at the appropriate time.

Once published, a document appears in full-text searches. It also is visible within any folder that lacks a default index_html document.

One of my favorite Plone features is properties. Each document can be assigned one or more properties by the properties management tab at the top of the screen. When a user views the content, the related portlet lists all of the other documents on the site that share one or more properties with the current one. This allows site visitors to find easily other content that might interest them.

Conclusion

Zope is a powerful application server, and the CMF is a powerful toolkit for creating a CMS. But, given the steep learning curve associated with both of them, it is possible that Plone may be the killer app for Zope, bringing new people into the world of Zope through great functionality that is easy to install, configure and manage.

Next month, we will take a closer look at Plone, examining ways we can modify what is displayed, including changing the site's look and feel.

Resources

Reuven M. Lerner (reuven@lerner.co.il) is a consultant specializing in open-source web/database technologies. He and his wife, Shira, recently celebrated the birth of their second daughter, Shikma Bruria. Reuven's book Core Perl was published by Prentice Hall in early 2002, and a second book about open-source web technologies will be published by Apress in 2003.