PloneBook.pdf
To change the maximal image width select one of the following: medium
Up to table of contents [http://docs.neuroinf.de/PloneBook]
>> 2. Installing Plone >> [http://docs.neuroinf.de/PloneBook/ch2.rst?image_scale=medium]
1. Introducing Plone
Chapter 1
A company without a Web site is unthinkable—and most companies and organizations have more than one site. Whether it's an
external site for communicating with clients, an intranet for employees to use, or a site for direct client communication and
feedback, all Web sites have a common problem—how to manage the content on them. This is a challenge that can often cost
organizations large amounts of time and effort. Producing a powerful yet flexible system for these sites that meets ever-changing
requirements while growing to meet your company's emerging needs isn't easy.
No matter what the requirements for your Web site are or the amount of content or users, Plone is a user-friendly, powerful
solution that lets you easily add and edit any type of content through the Web, produce navigation and searches for that content,
and apply security and workflow to that content.
Plone enables you to put together almost any Web site and easily update it. This lets you build content-rich sites quickly so you
can gain a competitive advantage. Finally, probably the best things about this system are that it's free and it's open source. With its
large and impressive feature set, it's comparable, if not better than, many closed-source content management systems that cost
hundreds of thousands of dollars.
Mike Sugarbaker says the following when reporting on the Open Source Content Management Conference (OSCOM) in 2002 for
the Mindjack site (http://www.mindjack.com/events/oscom.html [http://www.mindjack.com/events/oscom.html] ):
"I won't do the complete rundown of all the 'competing' open-source content management frameworks. I'll cut to the chase: The
winner is Plone. This 'productized' take on the six-year-old web application framework Zope was the package with the most tools,
the most professionalism, the most traction, and, above all, the most buzz."
You can find the Plone Web site at http://www.plone.org [http://www.plone.org] , as shown in Figure 1-1. To try Plone easily, a
demonstration site is available at http://demo.plone.org [http://www.plone.org] . There you can quickly and easily add and edit
content through the Web. Specifically, you can add events, upload pictures, add documents, and process them all through the
framework that Plone provides.
[img/3294f0101.png/image_view_fullscreen]
Figure 1-1. The Plone Web site
What Is a Content Management System?
One simple definition for a Content Management System (CMS) is that it's a system for managing content. This is a rather
unhelpful definition, so I'll break it down into smaller parts for a fuller explanation. I'll start with a broad definition of content:
Content is a unit of data with some extra information attached to it. That piece of data could be a Web page, information about an
upcoming event, a Microsoft Word document, an image, a movie clip, or any piece of data that has meaning to the organization
deploying the system.
All these items are called content, and they all share similar attributes, such as the need to be added or edited by certain users and
be published in various ways. A system called workflow controls these attributes. Workflow is logic defined by the organization's
business rules, and it describes a system for managing the content.
Historically there has been a difference between document management systems and CMSs, but mostly these two systems have
converged. The essential difference is the items being managed; it's often considered that content is any unit of information, and a
document refers to something that's created and edited by humans using software such as Microsoft Office. Take, for example, a
book: A book contains many units of data and may require management slightly different from that required by content. However,
in most cases, this is a small difference, and products such as Plone are able to manage the small units of a larger piece of content
and reassemble them.
With the ubiquitousness of the Web, many CMSs are now classified as Web CMSs, either because they have a Web-based interface
or because they focus on a Web-based delivery system over the Internet or an intranet. Plone provides a Web management
interface and Web-based delivery system.
The following is one definition of a CMS (http://www.contentmanager.eu.com/history.htm
[http://www.contentmanager.eu.com/history.htm] ):
A CMS is a tool that enables a variety of (centralized) technical and (decentralized) nontechnical staff to create, edit,
manage and finally publish a variety of content (such as text, graphics, video, and so on) whilst being constrained by a
centralized set of rules, process, and workflows that ensure a coherent, validated Web site appearance.
Do You Want a Content Management System?
Although not the only advantage of a CMS, the most obvious benefit of a CMS is coordinating a Web site easily. Take a situation
where one person, a Webmaster, coordinates a Web site, either an intranet or an external site. Content comes from users in a
variety of formats, and the Webmaster turns these into usable Web pages by converting them to Hypertext Markup Language
(HTML). If a user has to change those pages, then the user sends the changes to the Webmaster, who changes the pages, and so
on.
This presents many problems for the organization, the biggest being that all content is flowing through one person -
an obvious bottleneck. That one person can do only so much work, and if that person is sick or leaves the company, a
great deal of productivity is lost in finding a replacement. The publishing process can be quite frustrating as e-mails fly
between the Webmaster and the user trying to get content published.
What's needed is a system that does the following:
Separates the content of a page from the presentation: If the actual content is separate from the presentation
method, then the content author doesn't need to know any HTML or how the page is delivered. In fact, one piece of
content could have many different templates applied to it, including formats other than HTML, such as Portable
Document Format (PDF), or Scalable Vector Graphics (SVG). When you want to change the look and feel of the site,
you have to change only that one template rather than all the content.
Allows certain users to add and edit content: If specified users can add and edit content easily, then there's no
need to send content to the Webmaster or Web team. Instead, the user who wants to create a page can do so and edit
it as much as necessary.
Applies rules to whom can publish what and when: Your business rules might not want just anybody
publishing content on your Web site; for example, people in marketing would be able to publish to the press release
part of the site and not to the engineering section.
Can apply business rules to content: If a person from marketing creates a press release, somebody in legal might
need to review that document. In this case, the document will be passed through a review process that ensures it won't
go live until these reviews are done.
Can search and index information intelligently: Since the CMS can keep track of structured information about
the content (such as author's name, publication date, modification dates, categories, and so on), it can produce listings
of content by author, recent content, and so on. It can also provide searching capabilities that are much smarter and
more useful than just a simple textual search.
Although this example portrays paybacks that are more significant for large organizations, organizations of all levels benefit from
this approach. In fact, typically small organizations that don't employ a full-time Webmaster can be one of the key beneficiaries of
such a system. By installing a CMS, you can resolve all these issues and more.
The key factor of any CMS is that it provides a clear separation of the key elements in it: security, workflow, templates, and so on.
For example, the templates presenting an item are separate from the content. This allows you to easily modify the presentation.
Introducing Plone's Features
Plone is open source, licensed under the General Public License (GPL), which is a common open-source license that allows anyone
to use the source for free. For more information about the GPL, go to the Free Software Foundation Web site at http://ww.gnu.org
[http://ww.gnu.org] . You can examine any aspect of Plone's code and alter it to fit your application. There are no licensing fees to
pay, there's no license that will expire, and all the code is visible. This open-source philosophy means that Plone already has a
large user base and legion of developers, usability experts, translators, technical writers, and graphic designers who are able to
work on Plone. By choosing Plone, you're not locked into one company; rather, nearly a dozen companies offer different Plone
services.
Packaging
Plone maintains easy installers for Windows, Linux, and Mac. Other third-party products and add-ons also come with the
installers. Maintaining quality releases of these products makes installation and management easy. Also, each new release
maintains migration paths and updates so that your Plone site will keep working and stay up-to-date.
Internationalization
The whole Plone user interface is translated into more than 20 languages, including Korean, Japanese, French, Spanish, and
German. Inserting your own translation is easy (see Chapter 4).
Usability
Plone offers an excellent user experience that provides high levels of usability and accessibility. This isn't just a matter of
presenting pretty HTML but instead goes to the core of Plone. Plone provides an interface that's compatible with the industry and
government standard WAI-AAA and U.S. Section 508. This allows sites built with Plone to be used by people with vision
disabilities. In addition, this provides the unexpected but related benefit that your page may index better in search engines such as
Google.
Skinnable
Plone separates the content from the actual templates used to present the content, often called skins. The skins are written in the
excellent HTML templating system, Zope Page Templates, and a large amount of Cascading Style Sheets (CSS). With little
knowledge of Plone, you can apply multiple skins, achieve multiple looks, and totally customize your Web site's appearance.
Registration and Personalization
Plone features a complete user registration system. Users register with a Plone site using their own username, password, and any
other information you might want to add about the user. You can then personalize the whole user interface for that user. In
addition, with add-ons, you can use information you already have about users, coming from many places, such as relational
databases, Lightweight Directory Access Protocol (LDAP), Active Directory, and more. Chapter 8 covers how to register and
configure users.
Workflow and Security
Workflow controls the logic of processing content through the site. You can configure this logic through the Web using graphical
tools. Site administrators can make sites as complex or as simple as they'd like; for example, you can add notification tools such
as sending e-mails or instant messages to users. Chapter 8 covers workflow in great detail.
For every item of content in a Plone site, you can set up access control lists to decide who has access to that item and how they'll
be able to interact with it. Will they be able to edit it, view it, or comment on it? All this is configurable through the Web (see
Chapter 9).
Extensible
Since Plone is open source, it can be easily altered. You can change and configure almost any aspect of Plone to suit your needs.
Countless packages and tools for Plone provide a wide array of options for smaller sites and for large-scale enterprises.
Repositories of free add-ons for Plone are available at http://www.plone.org [http://www.plone.org] . With development tools
such as Archetypes (covered in Chapter 13), you can generate and alter Plone code easily through the Web or using Unified
Modeling Language (UML) tools. Chapter 10 covers integration of Plone with enterprise solutions such as LDAP, Apache,
Microsoft Internet Information Services (IIS), Macromedia Dreamweaver, and so on.
Content Customization
Users of a Plone site can add all manner of content, but the data added isn't limited or constrained. Plone developers can create
their own content types so that almost any type of content can be managed; the only limit is your own imagination. In Chapters 11
and 12, I'll discuss how to customize the content types. Chapter 13 will introduce Archetypes, which is a very powerful system for
generating content types that don't require programming; for instance, you can generate new types of content from UML tools.
Documentation
The Plone project maintains documentation, including this book, which is published under the Creative Commons license. The
best starting place for the community documentation is at http://www.plone.org/documentation
[http://www.plone.org/documentation] .
Community
One of the best things about Plone is the community of developers and companies that supports and develops Plone. With more
than 60 developers involved to some degree in the project around the world, it's almost always possible to find a Plone developer
online who is willing and able to help you. Alan Runyan, Alexander Limi, and Vidar Andersen started Plone; however, it quickly
grew into a thriving open-source project as more developers became involved. The contributions from these developers form the
Plone product that's now available.
Example Plone Sites
Many Plone sites exist; some are obvious because of their looks, and some aren't. The following is just a small sample of the more
diverse sites:
Plone (http://www.plone.org) Plone Demo Site (http://demo.plone.org) Zope.org (http://www.zope.org)
Liquidnet (http://www.liquidnet.com) Design Science Toys (http://www.dstoys.com) Give Kids the World
(http://www.gktw.org) Propane (http://www.usepropane.com) Maestro Headquarters
(http://mars.telascience.org)
More Plone sites are available at http://www.plone.org/about/sites [http://www.plone.org/about/sites] , including sites that
provide a quite different user interface. Without knowing about the development of these sites, it would in fact be hard to tell that
these sites use Plone.
Getting Involved in Plone's Development
Although Plone has an impressive list of features, its list of 'wants' even more impressive. For this reason, the project is always on
the lookout for new people willing to contribute time for the project.
Fortunately, because Plone is focused on the end user, there's a need for a very broad spectrum of disciplines. Volunteers in a
range of areas, rather than just coders or Web developers, are welcomed. Plone needs user interface developers, usability experts,
graphic designers, translators, writers, and testers. You can find the current development status on the Plone Web site at
http://plone.org/development [http://plone.org/development] , and the best way to get involved is to join the mailing lists or join
the developers on an Internet Relay Chat (IRC) channel.
Plone is built on top of Zope and the Content Management Framework (CMF). To understand Plone, you have to understand Zope
and the CMF as the underlying architecture. For this reason, I'll explain these two items and how they integrate with Plone in this
section.
Zope is a powerful and flexible open-source Web application server developed by Zope Corporation
(http://www.zope.org [http://www.zope.org] ). Originally, Zope was developed as a stand-alone CMS, but over time it
didn't satisfy the needs of its users. Then Zope Corporation developed the CMF an open-source project. The CMF
To change the maximal image width select one of the following: medium
Up to table of contents [http://docs.neuroinf.de/PloneBook]
<< 2. Installing >> 4. Making Simple Customizations >> [http://docs.neuroinf.de/PloneBook/ch4.rst?image_scale=medium]
Plone << [http://docs.neuroinf.de/PloneBook/ch2.rst?image_scale=medium]
3. Adding and Editing Content
Chapter 3
Adding and editing content is a simplification of the sheer power that Plone has available to leverage. Creating content-rich and
feature-rich Web pages with Plone is an absolute breeze. If you have Plone installed locally, then this chapter shows you how Plone
works straight out of the box. However, if you don't have Plone installed, then don't worry; you can try Plone online by going to
http://demo.plone.org [http://demo.plone.org] .
Before you can alter or edit a Plone site, you need to log into a Plone site. If you installed Plone, you should have the username
and password that came with the installation. This user has the role of an administrator user, which allows you to log in and alter
any content. Most users of a Plone site will join the site and log in through the login process described in the 'Joining a Site'
section. Users can, of course, view a Plone site without logging in, but they won't be able to add or edit content.
In this chapter, I'll go through the steps a user takes to create content on a Plone site. First, I'll cover how to join the site and log
in. Once you've accomplished this, I'll cover how to create and then edit a document. Finally, I'll show how you can search and
publish this content. In short, this chapter covers how to use Plone.
Joining a Site
When you join a Plone site, you create an account on the server. That account gives you the right as a member to add content
such as images, documents, and so forth. To join a site, click the join link in the top-right corner of the Web site (see Figure 3-1).
[img/3294f0301.png/image_view_fullscreen]
Figure 3-1. Clicking the join link in the top-right corner of the page
This will take you to a registration form that you'll have to complete (see Figure 3-2). Because this is the first Plone form you've
encountered, take note of the following:
Some fields are required; a little red box next to the text indicates the required fields.
For most fields, some grayed-out help text beneath the field name indicates what you should enter.
[img/3294f0301.png/image_view_fullscreen]
Figure 3-2. The registration page
NOTE Because many of the Plone pages are quite large, the figures in this book have been cropped to show only the
key parts (in this case, the form) and not the Plone logo or the footer. These elements are still there, but they're
superfluous.
To complete the form, complete the fields that are reasonably obvious. The values of the fields are as follows:
Full Name: Enter your full name. This field is optional.
User Name: Enter the username you want to use. Most people choose an alphanumeric value without spaces, such
as bob or jane97. This username will be used throughout the Web site to refer to you. This field is required.
E-mail: A valid e-mail address is required. This will allow the site administrator to contact you and to send a
password to you. You can change this e-mail address later by editing your member preferences. This field is required.
Password and Confirm Password: This is the password you want to use; it must be more than four characters
and can contain letters, numbers, and the underscore (_) character. Passwords are case sensitive (in other words,
SomePassword isn't the same as somepassword). These fields are required.
Send a mail with the password: Check this box if you'd like your password sent to the e-mail address you
provided. This field is optional.
Once you've completed this form, click Register to submit your information. If you've made any errors on this form, then you'll see
a message at the top and the key fields that have an error highlighted. In Figure 3-3 I entered a password but didn't enter a value
for the Confirm Password field. Again, this is the standard way that Plone forms will show errors to you.
[img/3294f0303.png/image_view_fullscreen]
Figure 3-3. Errors on a form
If you've completed the form correctly, then you'll be given the option of logging in immediately. Click the Log In button to log in.
You'll see the page shown in Figure 3-4.
[img/3294 f0303.png/image_view_fullscreen]
Figure 3-4. After registering
If you already have a username and password or are returning to a site you've previously joined, then you can enter your name
and password in the boxes in the left column of the site and click the Log In button.
Enabling Cookies
To log into a Plone site, you must have cookies enabled. If you access a Plone site and try to log in with cookies disabled, you'll get
a friendly message telling you that cookies must be enabled with a link to more information. To enable cookies, perform the
following steps, depending on your browser.
Internet Explorer 6.x
1. Select Tools > Internet Options.
2. Click the Privacy tab at the top of the screen.
3. Move the slider to Medium, and click OK.
Internet Explorer 5.x
1. Select Tools > Internet Options.
2. Click the Security tab at the top of the screen.
3. Click Custom Level, and scroll down to the Cookies section.
4. Set Allow Per-Session Cookies to Enable, and click OK.
Internet Explorer 4.x
1. Select View > Internet Options.
2. Click the Security tab at the top of the screen.
3. Click Custom Level, and scroll down to the Cookies section.
4. Select Always Accept Cookies or Prompt Before Accepting Cookies, and click OK.
Mozilla 1.x
1. Select Edit > Preferences.
2. Find Privacy & Security in the menu on the left. If there’s a plus sign (+) to the left of Privacy & Security, click it.
3. Select Cookies under Advanced.
4. Select Enable Cookies for the Originating Web Site Only or Enable All Cookies, and click OK.
Opera
1. Press F12.
2. Click Enable Cookies.
Netscape Navigator 6.x
1. Select Edit > Preferences.
2. Find Privacy & Security in the menu on the left. If there’s a triangle pointing to the right next to Privacy & Security,
click it.
3. Select Cookies under Privacy & Security.
4. Select Enable Cookies for the Originating Web Site Only or Enable All Cookies, and click OK.
If you forget your password at some point, you can get it sent to the e-mail address provided when you registered with the Plone
site. To have your password mailed to you, click the Forgot your password? link located in the left column of the Web site. This
will bring up the forgotten password form, as shown in Figure 3-5; enter your login name, and a password will be e-mailed to
you.
[img/3294 f0305.png/image_view_fullscreen]
Figure 3-5. Getting a forgotten password
Unfortunately, if you have no longer access to that e-mail account, or you can't even remember the username, you'll have to
contact a site administrator. Using the techniques discussed in Chapter 9, the administrator can change your e-mail and find your
user account. Once logged in to the Plone site, you'll see a log out link in the upper-right corner. When your work is finished, it's
good practice to log out of Plone site, especially if you're accessing it from a computer that's likely to be used by other people.
Setting Up Your Folder and Preferences
After you've logged in, the member bar in the top-right corner will change to represent the options available to you as a member
of the site (see Figure 3-6).
[img/3294f0306.png/image_view_fullscreen]
Figure 3-6. Your personal choices in the top-right corner have changed.
One of these options is that each member has a folder created for them when they join a site. This folder is set up with particular
security so only that member (and administrators) can add and edit the content in that folder. To access your personal folder,
click the my folder link in the personal bar in the upper-right corner of the site. In the upper-right corner you'll also see a my
preferences link; clicking this will open a list of personalization options. You'll see two choices at the moment; you can change
your password, or you can go to the personal preferences and change key preferences in your site.
The change password form allows you to change your password. To complete the form, give your current password and the new
password twice. After you've changed your password, the change will be immediate. You don't have to log in again; just remember
your new password when you return.
The personal preferences form allows you to set a number of preferences that change how you see the site. These preferences are
stored on the server so they're retained between uses of the site (see Figure 3-7).
[img/3294f0306.png/image_view_fullscreen]
Figure 3-7. Changing preferences
The options are as follows:
Full name: This is the full name you gave when you registered with the site.
E-mail: This is the e-mail address associated with your membership and is used a number of places in a Plone site.
Most important, if you lose or forget your password, this is the address to which the system will send it.
Content editor: When editing complex content, you may want the help of an editor. If your site administrator has
made one available, you can select it here. It will then be used when you click the edit tab of an object. If you're
unsure, leave this as the default.
Listed status: This property specifies whether your profile will show up on the members tab and when someone
searches the members listing.
Editing of Short Names: Objects have an ID or Short Name property that's used for the internal representation of
the content object. This also shows up in the item's Web address and the item's Uniform Resource Locator (URL). By
default these look something like News_Item.2002-11-16.4102, but you could make it much simpler, such as
november_news, by changing the Short Name value.
NOTE When you change an object's name value, anything that references the older name will no longer be valid and
will result in the page not being found. It's best not to change the name value after you submit an object for review or
link to it from elsewhere. For this reason, I recommend setting this option to No.
Portrait: In larger organizations and in community Web sites, it's useful to see pictures of other members. The
Portrait field allows you to upload a picture of yourself. The picture should be 75 by 100 pixels.
Once you've made the desired changes, click the Save button to commit the changes. Now that you've logged in, it's time to start
adding and editing content.
Adding and Editing Documents
As mentioned, now that you're a site member, a folder has been created for you where you can store content. Of course, you can
add content to any folder that the site administrator has given you the right to do so, but by default every user can add content to
their member folder.
Each type of content you can add is distinct, and you can edit and view it in different ways. For this reason, Plone references each
type of content differently; for example, you can add images, links, documents, and so on. Out of the box, Plone provides the
following content types:
Document : This is an item that presents some static information to the user. This is the most common type of
content added and most closely represents a typical Web page.
News item: This is a document that's to be shown under the news tab (for example, a press release).
Link : This is a link to another item, which may be internal or external to another Web site.
Image : This is an image, such as a .gif or .jpeg file.
Event : This is an upcoming event, meeting, conference, or other event.
Folder : This is like a folder on a hard drive; this is a folder for putting content into so that it's easy to find later.
Topic: This is a grouping of other content. This is essentially a saved search criteria that you can reuse later.
Only privileged site users can add topics.
File : This is another piece of content such as a movie, sound clip, text file, spreadsheet, compressed file, or
anything else you'd like to upload.
I'll go through each of these items using the document as an example, showing in detail how to add and edit documents easily and
quickly. Using these basic content types, I'll show you how to build a dynamic site through a browser, without doing any
programming.
Actually, you have many ways of adding and editing content in a Plone site than just through a Web browser. Access via File
Transfer Protocol (FTP), via Web-based Distributed Authoring and Versioning (WebDAV), or via scripts is all possible. I'll discuss
how to set these up in Chapter 10 and just deal with the Web browser interface for now. In Chapters 11 to 13 of this book, I'll
discuss how to make new custom content types that you can tailor to a particular site's needs.
Understanding the Document Content Types
Rather than detailing how to add and edit all the different types of content available, I'll cover adding one type of content, a
document, in detail. After adding and editing a few of these documents, the approach to adding content should be second nature,
and editing other content will be easy.
A document is a page of content, usually a self-contained piece of text. Although all items added to Plone are accessible as Web
pages, if there's one content type you could think of as a Web page, this is it. The default home page for a Plone site that you've
seen already - the now-famous Welcome to Plone page - is one example of a document (see Figure 3-8).
[img/3294 f0308.png/image_view_fullscreen]
Figure 3-8. Welcome to Plone, a simple document
Adding a Document
You have two ways to add any piece of content using a Web browser. First, ensure you're logged in, because only logged-in users
can add content. Second, select the my folder link from the top-right navigation bar. This will take you to your home folder, an
area that you control. If you're able to add content to a folder, then the folder will show up with the green border around the top
(see Figure 3-9).
[img/3294f0309.png/image_view_fullscreen]
Figure 3-9. My content
If the green border doesn't appear, then you won't be able to add content; this border contains the actions you can perform in the
current location. In Figure 3-9, you can see that the page shows the contents of the folder, because that's the highlighted tab.
Other tabs appear such as view, sharing, and properties for more advanced options. In the top-right corner of the green border,
you'll see an Add New Item drop-down menu and a State drop-down menu. Click the Add New Item menu to open a drop-down
list of items to add (see Figure 3-10).
[img/3294f0309.png/image_view_fullscreen]
Figure 3-10. Adding a document from the green drop-down menu
To add a new document, select Document. Alternatively, if you look in the body of the page, you can see another Add New Item
drop -down box. Again, click the down arrow to open a list of items that can be added and then select the item you'd like to add
(see Figure 3-11).
[img/3294f0309.png/image_view_fullscreen]
Figure 3-11. Adding a document from the main folder's content menu
Using the Add New Item list from the green border is a handy menu since it's available most of the time.
NOTE **If you're familiar with Zope, you should never, never, never add content from the Zope
Management Interface (ZMI). Depending upon how you've installed Plone, you may have already seen
the ZMI and used it for customizing and developing Plone through the Web. However, adding content
through the ZMI will create content items that are incomplete and don't ***Begin Sidebar*
Understanding Where to Add Content
The easiest place to add content at the beginning is in the user's member folder, accessible by clicking the my folder link.
Although this is useful, it's probably not the best approach for a long-term solution. Most noticeably it creates long URLs (for
example, /Members/andy/Docum....). It also means your content isn't accurately reflected in the navigation tree.
As you'll see later, a few solutions exist for this; the most common solution is to make a folder and give certain users the right to
access it. For example, that folder may be Help or News. The 'Using Folder” section later in this chapter discusses adding folders,
and Chapter 9 discusses using group workspaces and security.
Editing a Document
Once you've clicked to add a document, you'll be taken directly to the edit page with a message telling you that the document has
been created. If this doesn't happen, you can click a document and then click the edit tab. Again, you'll see that the edit tab
becomes highlighted in green (see Figure 3-12).
[img/3294 f0312.png/image_view_fullscreen]
Figure 3-12. Editing a document
Now you can edit the document in your Web browser, using the form provided. If you look at the URL in the address bar of your
browser, you'll note that a short name for the object has been created for you, something such as Document.2003-12-29.43787.
The following is a list of the fields and their meanings:
Short name: The short name will become part of the document's URL, so keep the name short and descriptive,
preferably without spaces. Keeping to these rules will make URLs easier to read. For example, use something such as
audit -report-2003 . If you don't provide a name, Plone will create one for you.
NOTE This field won't appear if you selected No for the short names in your preferences page.
Title : This is the title for the item, and it'll be shown throughout the site (for example, at the top of the page, in the
Title: This is the title for the item, and it'll be shown throughout the site (for example, at the top of the page, in the
search interface, in the title of the browser, and so on). This field is required.
Description: This is a short lead-in to the document, usually about 20 words to introduce the document and provide
a teaser for the remainder of the document. This is useful for pages that show summaries of documents, such as
search results and folder contents.
Body text: This contains the body of the document. The format for the content is set using the Format field
(described next).
Format : You have three choices for the format of body content: Structured Text, HTML, and Plain Text. These types
of text are discussed in the 'Choosing a Text Format” sidebar; if you're unsure, leave this field alone and type the body
text as usual.
Upload document: If you do have your document as a file on your computer, you can upload it instead of typing the
content into the Body Text field. Use the Upload button at the bottom of the page to select a file. The contents of an
uploaded file will replace any content in the Body Text field.
Once you've finished editing your document, click the Save button to commit your changes. You'll be returned to the view tab
where you can see how the document will be shown to users (see Figure 3-13); to edit it again, click the edit tab.
[img/3294 f0313.png/image_view_fullscreen]
Figure 3-13. Saving the content will take you to the view tab.
If you don't provide the correct input on the edit form, when you save the document you'll be returned to the edit page, and your
errors will be highlighted. At this point your changes haven't been applied—you must correct the mistakes and click Save again
before the changes will be committed. The view tab shown in Figure 3-13 shows the document you've created. You'll see that the
title, description, and content are all shown in slightly different styles. At the bottom of the page is a byline that contains
information about the author of the document, including the date the page was created.
You'll note that if you go back to folder contents after saving your changes, you'll see two documents in your folder: the existing
one that's created for you and the new one you've just added. You can edit either of these documents by clicking them to open the
view tab, which allows you to select the edit tab.
Choosing a Text Format
As mentioned previously, you can edit the document content in at least three formats: structured text, HTML, and plain text. This
rather confusing state of affairs is brought about by trying to produce easy systems for users to write rich marked-up content in
plain text without having to use fancy editors.
Unfortunately, in most cases, this really doesn't work; training is required to understand the formatting. Structured text requires
quite a bit of understanding in itself because it has a frustrating syntax and doesn't internationalize well. If I had to pick one
format that I'd recommend over all the others, I'd pick HTML because it's widely understood, and you can use What You See Is
What You Get (WYSIWYG) editors such as Epoz to produce it.
*HTML* HTML is the most standard format; if a document is entered as HTML, it will be rendered in the same format. This
HTML shouldn't be a complete page but rather a snippet. For example:
< p > H e r e is a sample in <i>HTML</i> for a demonstration.</p>
Ideally the HTML should also be valid Extensible HTML (XHTML) to comply with the rest of the Plone system; if it's not, your
pages don't comply with Web standards. Entering text as XHTML isn't for the faint of heart, so in Chapter 9, you'll see how into
integrate rich-editing tools into Plone that allow users to easily write content in XHTML. The following screen shot shows Plone
using Epoz so users don't have to understand HTML:
*production: please note that I've named sidebar graphics with an 's”*
[img/3294s0301.png/image_view_fullscreen]
*Plain Text* Plain text is simple. It does no major conversion or manipulation of the text entered; it's just plain text. The only
modification made is that new lines are converted into HTML when rendered so that new lines appear in the Web browser. No
other altering happens. For example:
H e r e is a sample in plain text for a demonstration
*Structured Text* Structured text is a system for writing plain-text documents in a particular format, which can then be
interpreted in different ways. For example, if a piece of text needs to be highlighted, then it can written as italics; this will then
be shown as italics. This series of rules means that a user can write a page that contains formatting information easily. For a full
list of structured text rules and examples, please see Appendix A. The following is a sample of structured text:
H e r e is a sample in *structured text* for a demonstration
Setting Document Metadata
Any piece of content can have any number of properties assigned to it. These properties are known as metadata and provide
information such as keywords, copyrights, and contributors of an item.
This entire set of properties is optional and is usually used only if there are special requirements for this piece of content,
especially since this information isn't normally shown to the person viewing the content. So the main reason for entering this data
is to add information for tasks such as searching or categorizing the content.
You can access properties on an object by selecting the green properties tab. This properties form has the following fields, which
are common to all content types:
Allow Discussion: This lets this document be discussed by users who have the right to do so. If the value is left as
default, it'll use the sitewide policy for that content type.
Keywords : Each item can have keywords assigned to it to enable grouping and sorting of the items. For example, an
article about recent events in politics may have the keywords politics and prime minister. Keywords are flexible, and
you can use any keyword from the given list. By default there are no keywords in the Plone system; site administrators
may add new keywords so that other users can select them.
Effective Date: The effective date is the first day a piece of content should be available. You can specify this date by
entering the values in the form or clicking the little calendar icon, which opens a calendar, and picking a date (see
Figure 3-14).
[img/3294f0314.png/image_view_fullscreen]
Figure 3-14. Entering an effective date
Expiration Date: The expiration date is the last day a piece of content should be available. Usually the Effective Date
and Expiration Date fields are left blank.
Format : This is the Multipurpose Internet Mail Extensions (MIME) type of the item. The term MIME type refers to a
computer definition of the type of content (for example, application/msword or image/jpeg). This is set at a default
value; if you're unsure about this field, just ignore it.
Language: This is the language in which the document is written; the default is English.
Copyright : This is the copyright information for the content, which is usually blank.
Contributors : This includes the names of the people outside the Plone system who contributed to the object. Each
person's name should be on its own line.
After completing the values for this form, click Save to commit the changes. As stated, usually you won't need to edit the values on
this tab. Editing the contents of this tab is usually based upon the requirements for your site and the type of site you're building.
What Are Effective and Expiration Dates?
Any item in the Plone system can have effective and expiration dates if the person editing the content wants. Both of these are
optional, and leaving the fields blank will ensure that these values aren't set.
One example of an item that may have an effective date is a press release. In the ideal world, the news item is crafted, prepared,
and reviewed in Plone. However, suppose the news item has to go live on the Web site at midnight, but that's exactly when you
plan to be sleeping. Not a problem—give the press release an effective date and a time of midnight. Up until the effective date, it
won't be visible in the calendar, in navigation, in searches, or in pages that use a search as the listing under the news tab.
However, anybody who knows about the press release will be able to access the page directly. Once the effective date has passed,
the item will appear in all the aforementioned places and be live to the world.
The effect is similar with expiration dates. If you have a special offer that stops being effective on a particular day, then you could
set an expiration date of that day. After that, date it wouldn't appear in calendar, navigation, searches, and so on.
The effective and expiration dates don't actually change the state of the item in workflow (see Chapter 7 for more information on
workflow); rather, they just change where it displays. You can also set effective and expiration dates on the state tab, which you'll
learn about in the next section.
Publishing Your Document
When a document is created, it's given an initial state, called visible. By default, content isn't automatically published and
available to the world; instead, others can view your content, but it doesn't show up in searches or the navigation tree. This is a
useful state because you can point other users to this content, but because it won't show up in navigation or searches, it's not
visible unless users know about it.
At any point in time, each item of content in your Plone site is in a particular state. This state describes its permissions and roles
within the Plone site. By having items in different states, it's possible to apply different security to each item of content. For
example, sometimes an item may take a week or two to prepare and involve multiple revisions. Eventually you'll want to publish
the content so that it's visible for all users and shows up in the navigation and search.
You can publish the content using the State drop-down menu located at the top right of the main navigation (see Figure 3-15).
[img/3294f0315.png/image_view_fullscreen]
Figure 3-15. State drop-down menu
To publish an object, select Submit from the drop-down menu. By default you can't directly publish content, but you can submit it
for review. When an item is submitted for review, it moves into the review state. This is an intermediary state between visible and
published. It allows for the review of content by users of your site with the reviewer role, before it goes live for the entire world to
see. After you've submitted the content, you'll notice that the content is now in the review state by looking at the box in the top-
right corner. You'll also notice that in Figure 3-16, there's no longer an edit tab.
[img/3294 f0315.png/image_view_fullscreen]
Figure 3-16. The content has been submitted for review, the state has changed to pending, and the edit tab is no longer an option.
NOTE If you're logged in as a manager, then you'll note there will be one extra option in the drop-down publishing list called
Publish. This lets you put content straight into the published state with no intermediate step.
In the workflow drop-down list in the top-right corner, there's also an option for Advanced, which opens the state form for
changing the status of an object. This form is the same as clicking the state tab. It has the following fields:
Effective Date: This is the same as the Effective Date field in the properties (see the 'Setting Document Metadata'
action).
Expiration Date: This is the same as the Expiration Date field in the properties (see the 'Setting Document
Metadata' section).
Comments : This includes any comments you want to make for this change in state that will be recorded in history.
For example, you could enter First draft; Bob, please see second paragraph.
Change State: These mirror the choices available in the drop-down menu. For example, the options are Publish,
Submit, and so on. One further option, No Change, is available if no change is necessary.
Select the change of state you'd like to occur, and click Save to commit the changes.
What Are the Workflow States?
At this point you may be asking yourself what this workflow thing is and what the states mean. Workflow, as discussed in Chapter
7, is the ability to apply different states to the content. The following are the default states:
Visible : Content is created in the visible state. All users can find visible content through the search function and can
access it directly by visiting the object URL. Visible content doesn't show up in the navigation tree. Visible content is
editable by their owners and site managers.
Pending: Pending content includes items that have been submitted for publishing by site members. From a user
standpoint, pending content behaves like content in the visible state. The difference between the two types is that
pending items are flagged for review; site reviewers are prompted to publish or reject pending items. Pending items
are editable only by managers and reviewers.
Published : Published items are visible to all site visitors. They appear in search results and the navigation tree. They
may also appear in other areas specific to that type (news items, for example, also appear when you click the news
tab). Published items are editable only by managers, but owners can retract them for editing (retracting reverts an
item to the public draft state).
Private: Items in the private state are visible and editable only by their owners and others with manager access to the
folder in which they exist. They won't appear in search results or on the navigation tree for other users. Private items
are editable by managers.
How Does Content Get Reviewed?
If you're a reviewer, then in the right column of the home page you'll see a new review list when you first log in. This is a list of
the items that have been submitted for review and need reviewing by you or another reviewer (see Figure 3-17).
[img/3294f0317.png/image_view_fullscreen]
Figure 3-17. The review list
The review list will appear on the right when you log in as a user with the review role and there are items to review. In my case, I
logged in as admin, which was the user created during my install process. You can tell you're logged in because your name will
appear in the member bar. The review list gives a list of items to review - in this case, you need to review the test document. Click
the document to open the item. At this point you essentially have the following choices for this item:
Reject it: Reject it by selecting Reject from the drop-down choices. This will move the content back into the visible
state and assumes that as a reviewer you're unhappy with it. Usually you may want to click the Advanced option to
open the comments form and add some comments stating why you're rejecting it.
Approve it: Approve it by selecting Publish; this will change the content into the published state. This will make the
content publicly available.
Do nothing: Leave it by doing nothing. This leaves the content in limbo but sometimes happens when you need to
check information or talk to others. Eventually you should return to do something with this content because it'll
continue to show up in your list of items until you make one of the previous actions.
Edit it: Edit it, and then perform one of the previous actions. As the reviewer, you can make any change you'd like to
do, so feel free to change the content by using the edit tab.
Once you've moved content out of the review state by publishing or retracting it, it will no longer show up in the review list. Of
course, this assumes you do have someone as a reviewer for your site; this usually (although not necessarily) is also the user who
created the Plone site as an administrator. In Chapter 8, I'll discuss how to add and edit users and give some users the review role.
How Do You Edit a Published Document?
Once a document has been published, it must be retracted to be edited. To do this, select Retract from the workflow drop-down
menu, which will move the item back into the visible state. Once it has returned to the visible state, you can reedit it and placed it
back into the review queue.
This step, although a little annoying, is necessary to ensure that all content goes through a review step. For example, you have to
ensure that any edits made to a page are appropriate by reviewing the content. Users with the manager role can edit the content at
any time, so they can quickly go in and fix a typo without having to go through the review step. It's assumed that users with a
manager role are trustworthy! If you're a manager, as defined in Chapter 9, you can go to any piece of content and will see the
edit tab. At that point, click Edit to alter the document and make your changes.
Sharing Your Document
This allows you to assign more rights to other users or groups of users of the system to your document. This is an advanced feature
and is covered in more detail in Chapter 9.
Adding and Editing Other Types of Content
I've just covered how to add and edit documents in detail. All the other content types are similar. They all have the same or
similar actions to edit; it's just the forms and the data in them that change. In the following sections, I'll cover some of these other
types of content. All the following types of content use the same workflow process, so they need to be published in the same
manner as documents.
Adding and Editing Images
Images are graphical pieces of content; you add them by selecting Image from the drop-down list. When you add an image, the
name of the content changes to the file of the image. So, if you upload an image called photo.gif, it'll be accessible in Plone as
photo.gif . When adding or uploading a new image, you can select the image from your hard drive by clicking the Browse button
and selecting the file (see Figure 3-18).
[img/3294f0318.png/image_view_fullscreen]
Figure 3-18. Uploading an image
It's common for image filenames to end with an extension such as .gif, .jpg, .jpeg, .png, or .pict. You can display images inside
Plone on a Web page without having to download them to the local computer if the type of the image uploaded is viewable in the
user's Web browser. The most common image types are .gif, .jpg, and .png, which are visible on almost computer system. Figure
3 -19 shows an image of the Plone logo.
[img/3294 f0318.png/image_view_fullscreen]
Figure 3-19. Viewing the image
You can't edit images directly; instead, you can edit the image on your hard drive using any program, such as Adobe Photoshop or
GNU Image Manipulation Program (GIMP). Once complete, clicking the edit tab allows you upload your new image into Plone. If
you do a lot of image manipulation, you can refer to Chapter 10, which covers External Editor, a tool that lets you edit images
using a program without having to upload and download them.
Adding and Editing Files
A file is any arbitrary file that can be uploaded from your hard drive. To add a file, select File* from the drop-down list. On the
edit tab, you'll see an Upload button that lets you pick the file from your hard drive. This could be any sort of item, including a
plain-text file, a Microsoft Word document, a Microsoft Excel spreadsheet, an executable program, an Adobe Acrobat document,
and so on. When you add a file, the name of the item in Plone changes to the name of the file uploaded. So, if you upload a file
called *book.pdf, it'll be accessible in Plone as book.pdf. Figure 3-20 shows a plain-text file.
[img/3294 f0320.png/image_view_fullscreen]
Figure 3-20. Adding a plain-text file
If the file is recognized as being text, then the contents of the file are shown in the Web page and are editable through the edit
tab. Otherwise, the file is downloadable, and users must download it to their local hard drive and edit it there. Afterward they can
upload it to the system. You'll note that a file object also has an extra download tab that lets you directly download the file.
Adding and Editing Events
An event can be something that will happen in the future or something that happened in past. You can add events to Plone, and
they show up on the calendar. To add an event, select Event from the drop-down list. An event has more information than most
Plone objects; however, most of it is self-explanatory (see Figure 3-21).
[img/3294f0321.png/image_view_fullscreen]
Figure 3-21. Adding an event
As usual, the only required field is Title; however, if you want the event to show up in the calendar, then you must provide a start
and end time. Events can span multiple days or be in the past—as long as the start date is before the end date. To enter a date,
select the appropriate dates from the drop-down menu, or click the little date icon to open a graphical date picker.
Once the event is published, it'll show up in the calendar. Moving a mouse over the item in the calendar will show the start and
end dates for the event, as well as the event's title (see Figure 3-22).
[img/3294f0321.png/image_view_fullscreen]
Figure 3-22. Viewing events in the calendar
Adding and Editing Links
Link content types are the primary way for users to share links. These URLs can be resources on the Internet or an intranet, an
internal resource, or anything to which the users have access. To add a link, select Link from the drop-down menu.
If you're going to link to an Internet resource, you should preface your link with the suitable protocol (for example, http://). For
If you're going to link to an Internet resource, you should preface your link with the suitable protocol (for example, http://). For
instance, if I was visiting an interesting page on the BBC's Web site and wanted to share this, I could add a link. The value of the
URL will be the text in the address bar (for example, http://news.bbc.co.uk [http://news.bbc.co.uk] ), as shown in Figure 3-23.
[img/3294 f0323.png/image_view_fullscreen]
Figure 3-23. Adding a link
Adding and News Items
News items are commonly used in Web sites to display news that's of interest to the reader. Actually, a news item contains the
same information as a document. The only real difference is that a news item will show up when a visitor clicks the news tab
(once the item is published), as shown in Figure 3-24.
[img/3294f0324.png/image_view_fullscreen]
Figure 3-24. A list of news items
If I wanted to write a Web page that was going to be relevant for a long period of time, such as directions to my company's office,
I'd use a document. If I wanted a page that detailed my exciting new product and drew attention to it, I'd use a news item. That
news item would be visible under the news tab, and as new things happened, it'd slowly move down the page.
Organizing Content
So far you've seen how to add and edit content in a Plone site, but without clear organization, this can become a mess quite
quickly. You have two main ways of organizing content: folders and topics. A folder is the simplest and most powerful mechanism
for organizing content and works just like a folder or a directory on a computer's hard drive. A folder can contain any item of
content; content can be copied and pasted between folders, and of course folders can contain other folders.
To organize content that's spread all over a site, a more sophisticated and less-used tool called a topic is available. A topic searches
your Plone site and finds all objects that match a certain criteria, allowing you to group lots of disparate content.
Using Folders
A folder is just like a folder or a directory on a hard drive, except that the folder and its contents exist inside Plone. You use a
folder the same way; when you need to categorize content or make things a little clearer, you can group items and place them in a
folder. To add a folder to your site, select Folder from the drop-down list. This will add a folder and take you to the edit
properties page for that form. A folder has just three rather simple attributes that a user can edit: Name, Title, and Description.
I've discussed all these attributes for documents, and nothing is different for folders.
Folders have two green tabs that represent slightly different views: contents and view. Actually, you may have already noticed that
there's a contents tab accessible from any piece of content that you've added to the site; for example, when you were editing a
document, the contents tab was there. That contents tab will always take you to the contents for that folder.
Viewing the Contents of a Folder
The folder has the concept of a default page, which is a page that will be shown to the user when they view a folder. It's a concept
taken from Web sites where viewing a folder on a Web site shows a default page if one is present; often that default page's name is
index.htm or index.html. If a folder has a default page, then clicking the view tab will show that default page. If the folder doesn't
have a default page, then it'll show a folder listing of all the content in that folder. When looking for a default page to display,
Plone looks through the folder for content with a certain name and shows this item. The page name is usually index.html or
index_html ; however, the site administrator can add or alter these names.
This contents view of a folder allows a user to perform a variety of tasks, such as move content, rename it, delete it, publish it, and
change the order it's listed. As shown in Figure 3-25, you'll also see a simple table of the folder contents. Each row of the table
shows the title of the content (plus an icon), the type, its size, when it was last modified, its current workflow status, and order
selectors. On the left is a checkbox to select the items you want to change and a series of options across the bottom: Rename, Cut,
Copy, Delete, and Change Status. These functions are all pretty self-explanatory, and you can apply them to multiple objects at
once by clicking several checkboxes.
[img/3294f0325.png/image_view_fullscreen]
Figure 3-25. Contents of a folder after I've added some of the content types described in this chapter
For example, to quickly rename a piece of content, click that item's checkbox and then click Rename. This will open the rename
form and allow you to rename the title of each item in that list. Click Save to have the changes take effect. The Cut and Copy
buttons allow you to copy or move content between different folders. The Delete button allows you to delete the item from Plone.
Just like on your hard drive, if you copy, move, or delete a folder, all the contents of the folder will also be moved, copied, or
deleted.
A new feature in Plone 2 is the ability to change the default order of items in a folder. By default, items in a folder will display in
the order the items were added. If one item is more important and needs to be moved to the top, use the arrows on the right side
of the table to move the item. The following features will appear in the folder contents only when certain things happen:
If the content has an expiration date set and it has expired, you'll see the word expired appear in red next to the
item.
If the server has External Editor installed, you can click the pencil to edit in External Editor (this is covered in
Chapter 10).
If the content is locked, you'll see a lock icon appear next to the content.
Publishing a Folder
Folders have a much simpler workflow than documents. Earlier in this chapter you saw how to publish content to make it publicly
visible because this allows users to create and edit content as much as possible before pushing it live. However, folders are a little
different because they contain content but don't have any content of their own. For this reason, folders have no review state.
Anyone can directly publish or make private folders, so there are three states: private, visible, and published.
After adding a folder, select Publish from the drop-down list. Then it'll show up in the navigation. As per the earlier rules for
workflow, if you don't publish a folder, it won't show up in the navigation.
Using Topics
A topic allows you to collect content from disparate places throughout a Plone site and provide it in one location. Topics work by
creating a criterion that's common to all the objects you'd like to gather. This criterion could be all images or all news items with
Plone in the text. Because topics are a rather complicated type of content, only managers can add them initially. If you can't see
Topic in the list of items to add, then you don't have the permission to do so.
To add a topic, select Topic from the drop-down list. After adding the topic, you can create key criteria on the criteria tab. The list
of criteria and types is available in the drop-down box at the bottom of the page. This is a rather confusing list; I won't try to
discuss it here. Unfortunately, what those terms are and what they mean is based heavily on the underlying technology, such as
discuss it here. Unfortunately, what those terms are and what they mean is based heavily on the underlying technology, such as
catalog indexes and object attributes. For this reason, Chapter 11 covers this in detail.
For example, to create a topic that shows all the images, you need to add a criterion that searches for content based on
portal_type. For this, select a field name of portal_type, select String Criterion, and then click Add. These criteria will be added
to the top of the page; in the field to the right of portal_type, enter Image, and then click Save. You now have criteria for your
topic that will show all content that's an image. Returning to the view tab, you can now see all the images on a site.
As stated, topics are quite complicated, have a rather unfriendly interface, and are recommended for only advanced users. Many
people have found topics useful, which is why they're still available in Plone; however, a more user-friendly system will be
developed in the future.
Discussing and Finding Content
Adding and editing content in Plone is much more useful if people can find and then discuss the content. The primary ways users
find content is through searching and navigation. Fortunately, Plone automatically sets up searching and navigation for the users,
so it's easy to find the content you've added.
Adding Comments to Content
Feedback from users is a vital part of any Web site. By allowing users to add comments, you ensure that users can give feedback,
correct typographical errors, or otherwise discuss the content. You can discuss almost any piece of content in Plone; folders and
topics are the only exceptions.
You can enable discussions in one of two ways. First, the owner of the content (otherwise known as the person who created it)
turns on the discussion feature by clicking the properties tab of the object and selecting Enabled under the Allow Discussion on
This Item header, as shown in Figure 3-26. Second, the default option applies the policy for that type of content as defined by the
site administrator; setting this option is described for the administrator in Chapter 10.
[img/3294 f0326.png/image_view_fullscreen]
Figure 3-26. Enabling discussions
Once discussions are enabled, click the Add Comment button to discuss the content, which opens a form for adding the comment
(see Figure 3-27).
[img/3294f0326.png/image_view_fullscreen]
Figure 3-27. Adding a comment to a piece of content
Enter the subject of the comment and the text of the comment. The text is entered as plain text, so just type away as usual.
Comments don't go through any workflow, so comments show up as soon as they've been added. Once a comment has been
entered, it can be replied to, forming a threaded list of comments on an item. Further, comments will be entered in the catalog so
they can be searched.
NOTE Administrators logged in as managers can remove any replies or entire threads. Disabling replies doesn't remove the
comments; it just stops them being shown, so reenabling comments will show the existing comments again.
Searching for Content
Plone contains a powerful search engine system based on Zope's ZCatalog. This search engine allows content to be cataloged in
multiple ways and to be queried efficiently and quickly. Chapter 10 covers the internals of how this works and how it can be
queried.
When you're searching for content, the content will be shown to a user if it's one of the two states: published or visible. At the top
of your Plone site a search box provides an easy way to do simple textual searches in the same way as a search engine (see Figure
3 -28). For example, enter Tuesday to find all content that contains the word Tuesday. A result of all matching content will
display; click the title to get to the content.
[img/3294 f0328.png/image_view_fullscreen]
Figure 3-28. A search for Tuesday on Plone.org
The search provides a quite sophisticated search, with features similar to most search engines. You can make this simple query
quite complex. For example, you can use the following options:
Globbing : You can use an asterisk to signify any letters. For example, entering Tues* matches Tuesday and
Tuesdays . You can't use the asterisk at the beginning of a word, though.
Single wildcards: You can use a question mark anywhere to signify one letter. For example, entering ro?e matches
rope, rote, role, and so on. You can't use the question mark at the beginning of a word, though.
And: You can use the word and to signify that both terms on either side of the and must exist. For example, entering
Rome and Tuesday will return a result of when both those words are in the content.
Or : You can use the word or to signify that either terms can exist. For example, entering Rome or Tuesday will
return a result of when either of those words are in the content.
Not : You can use the word not to return results where the word isn't present; a prefix of and is required. For example,
entering welcome and not page would return matches for pages that contained welcome, but not page.
Phrases : Phrases are grouped with double quotes (' ”) and signify several words one after the other. For example,
entering 'welcome page” matches This welcome page is used to introduce you to the Plone Content Management
System, but not Welcome to the front page of my Web site.
Not phrase: You can specify a phrase with a minus (-) prefix. For example, entering welcome -'welcome page”
matches all pages with welcome in them, but not ones that match the phrase welcome page.
NOTE All searches are case insensitive.
Large sites may have a lot of results, so only 20 results display at a time. To page through the results, navigation bars will appear
at the top and the bottom of the search result pages. The values on an object used in a search are its title, description, and body
text (if the content type has any—for example, news items and documents).
Performing an Advanced Search
You can narrow down the search results by using an advanced search, which is accessible via the search results of a standard
search. In old Plone sites, a search tab brought users to this page; you can reenable this tab if you want, as covered in Chapter 4.
The advanced search form enables a user to query content using a number of attributes, including title, keywords, description,
review state, creation date, content type, and even author, as well as the search text (as used in the quick search available from the
top-right corner), as shown in Figure 3-29.
[img/3294f0329.png/image_view_fullscreen]
Figure 3-29. Advanced search
Although the search text field searches both the title and description, you may want to search the description or title only. For that
reason, these fields are presented on the advanced search form. You can't search the title and description using the wildcards,
globbing, or any of the advanced search options. Any search result will match the input (if given) of all the fields; the results will
be an intersection of all the terms.
Example: Creating the Plone Book Web Site
To give an example Plone site and provide a series of examples, I set up a Web site for this book. This is a Plone site with a few
minor modifications. As I go through the book, I'll make references to the site and add new features as they're covered in the
book, including new templates, skins, and so on. The Web site for this book is at http://plone-book.agmweb.ca [http://plone-
book.agmweb.ca] ; initially I set this site up on Windows server, as described in Chapter 2. However, I later transferred it to Linux.
The site serves the following purposes:
It gives people a place to get information about the book and buy it.
It allows easy access to the software used in the book.
It gives code examples and allows users to interact with samples in the book.
It contains any errata or issues found after publication.
Once I set up a Plone site, I created the following basic folder and page structure:
Home
|_ Software
|_ Chapters
|_ Chapter 1
|_ Chapter 2
...
To do this, I logged in as the user who was created with the installer—in my case, the admin user. After logging in, I went to the
home page, clicked the edit tab, and wrote some text for the home page. I created links to the Chapters and Software folders.
Then I clicked the contents tab and added two folders, as shown in Figure 3-30.
[img/3294 f0330.png/image_view_fullscreen]
Figure 3-30. The folder contents with my home page and the new folders
Next, I went to the Chapters folder and started adding a folder for each chapter. Because I haven't made a default page, Plone will
Next, I went to the Chapters folder and started adding a folder for each chapter. Because I haven't made a default page, Plone will
happily create a listing of all the chapters. The description for each chapter is the name of the chapter (for example, Introducing
to Plone and This Book), and the short name is the chapter number—this will keep my URLs nice and short (for example,
/Chapters/3 ). I've left everything in the visible state, so after this, it's just a matter of adding content.
Up to table of contents [http://docs.neuroinf.de/PloneBook]
<< 2. Installing >> 4. Making Simple Customizations >> [http://docs.neuroinf.de/PloneBook/ch4.rst?image_scale=medium]
Plone << [http://docs.neuroinf.de/PloneBook/ch2.rst?image_scale=medium]
Up to table of contents [http://docs.neuroinf.de/PloneBook]
>> 2. Installing Plone >> [http://docs.neuroinf.de/PloneBook/ch2.rst?image_scale=medium]
1. Introducing Plone
Chapter 1
A company without a Web site is unthinkable—and most companies and organizations have more than one site. Whether it's an
external site for communicating with clients, an intranet for employees to use, or a site for direct client communication and
feedback, all Web sites have a common problem—how to manage the content on them. This is a challenge that can often cost
organizations large amounts of time and effort. Producing a powerful yet flexible system for these sites that meets ever-changing
requirements while growing to meet your company's emerging needs isn't easy.
No matter what the requirements for your Web site are or the amount of content or users, Plone is a user-friendly, powerful
solution that lets you easily add and edit any type of content through the Web, produce navigation and searches for that content,
and apply security and workflow to that content.
Plone enables you to put together almost any Web site and easily update it. This lets you build content-rich sites quickly so you
can gain a competitive advantage. Finally, probably the best things about this system are that it's free and it's open source. With its
large and impressive feature set, it's comparable, if not better than, many closed-source content management systems that cost
hundreds of thousands of dollars.
Mike Sugarbaker says the following when reporting on the Open Source Content Management Conference (OSCOM) in 2002 for
the Mindjack site (http://www.mindjack.com/events/oscom.html [http://www.mindjack.com/events/oscom.html] ):
"I won't do the complete rundown of all the 'competing' open-source content management frameworks. I'll cut to the chase: The
winner is Plone. This 'productized' take on the six-year-old web application framework Zope was the package with the most tools,
the most professionalism, the most traction, and, above all, the most buzz."
You can find the Plone Web site at http://www.plone.org [http://www.plone.org] , as shown in Figure 1-1. To try Plone easily, a
demonstration site is available at http://demo.plone.org [http://www.plone.org] . There you can quickly and easily add and edit
content through the Web. Specifically, you can add events, upload pictures, add documents, and process them all through the
framework that Plone provides.
[img/3294f0101.png/image_view_fullscreen]
Figure 1-1. The Plone Web site
What Is a Content Management System?
One simple definition for a Content Management System (CMS) is that it's a system for managing content. This is a rather
unhelpful definition, so I'll break it down into smaller parts for a fuller explanation. I'll start with a broad definition of content:
Content is a unit of data with some extra information attached to it. That piece of data could be a Web page, information about an
upcoming event, a Microsoft Word document, an image, a movie clip, or any piece of data that has meaning to the organization
deploying the system.
All these items are called content, and they all share similar attributes, such as the need to be added or edited by certain users and
be published in various ways. A system called workflow controls these attributes. Workflow is logic defined by the organization's
business rules, and it describes a system for managing the content.
Historically there has been a difference between document management systems and CMSs, but mostly these two systems have
converged. The essential difference is the items being managed; it's often considered that content is any unit of information, and a
document refers to something that's created and edited by humans using software such as Microsoft Office. Take, for example, a
book: A book contains many units of data and may require management slightly different from that required by content. However,
in most cases, this is a small difference, and products such as Plone are able to manage the small units of a larger piece of content
and reassemble them.
With the ubiquitousness of the Web, many CMSs are now classified as Web CMSs, either because they have a Web-based interface
or because they focus on a Web-based delivery system over the Internet or an intranet. Plone provides a Web management
interface and Web-based delivery system.
The following is one definition of a CMS (http://www.contentmanager.eu.com/history.htm
[http://www.contentmanager.eu.com/history.htm] ):
A CMS is a tool that enables a variety of (centralized) technical and (decentralized) nontechnical staff to create, edit,
manage and finally publish a variety of content (such as text, graphics, video, and so on) whilst being constrained by a
centralized set of rules, process, and workflows that ensure a coherent, validated Web site appearance.
Do You Want a Content Management System?
Although not the only advantage of a CMS, the most obvious benefit of a CMS is coordinating a Web site easily. Take a situation
where one person, a Webmaster, coordinates a Web site, either an intranet or an external site. Content comes from users in a
variety of formats, and the Webmaster turns these into usable Web pages by converting them to Hypertext Markup Language
(HTML). If a user has to change those pages, then the user sends the changes to the Webmaster, who changes the pages, and so
on.
This presents many problems for the organization, the biggest being that all content is flowing through one person -
an obvious bottleneck. That one person can do only so much work, and if that person is sick or leaves the company, a
great deal of productivity is lost in finding a replacement. The publishing process can be quite frustrating as e-mails fly
between the Webmaster and the user trying to get content published.
What's needed is a system that does the following:
Separates the content of a page from the presentation: If the actual content is separate from the presentation
method, then the content author doesn't need to know any HTML or how the page is delivered. In fact, one piece of
content could have many different templates applied to it, including formats other than HTML, such as Portable
Document Format (PDF), or Scalable Vector Graphics (SVG). When you want to change the look and feel of the site,
you have to change only that one template rather than all the content.
Allows certain users to add and edit content: If specified users can add and edit content easily, then there's no
need to send content to the Webmaster or Web team. Instead, the user who wants to create a page can do so and edit
it as much as necessary.
Applies rules to whom can publish what and when: Your business rules might not want just anybody
publishing content on your Web site; for example, people in marketing would be able to publish to the press release
part of the site and not to the engineering section.
Can apply business rules to content: If a person from marketing creates a press release, somebody in legal might
need to review that document. In this case, the document will be passed through a review process that ensures it won't
go live until these reviews are done.
Can search and index information intelligently: Since the CMS can keep track of structured information about
the content (such as author's name, publication date, modification dates, categories, and so on), it can produce listings
of content by author, recent content, and so on. It can also provide searching capabilities that are much smarter and
more useful than just a simple textual search.
Although this example portrays paybacks that are more significant for large organizations, organizations of all levels benefit from
this approach. In fact, typically small organizations that don't employ a full-time Webmaster can be one of the key beneficiaries of
such a system. By installing a CMS, you can resolve all these issues and more.
The key factor of any CMS is that it provides a clear separation of the key elements in it: security, workflow, templates, and so on.
For example, the templates presenting an item are separate from the content. This allows you to easily modify the presentation.
Introducing Plone's Features
Plone is open source, licensed under the General Public License (GPL), which is a common open-source license that allows anyone
to use the source for free. For more information about the GPL, go to the Free Software Foundation Web site at http://ww.gnu.org
[http://ww.gnu.org] . You can examine any aspect of Plone's code and alter it to fit your application. There are no licensing fees to
pay, there's no license that will expire, and all the code is visible. This open-source philosophy means that Plone already has a
large user base and legion of developers, usability experts, translators, technical writers, and graphic designers who are able to
work on Plone. By choosing Plone, you're not locked into one company; rather, nearly a dozen companies offer different Plone
services.
Packaging
Plone maintains easy installers for Windows, Linux, and Mac. Other third-party products and add-ons also come with the
installers. Maintaining quality releases of these products makes installation and management easy. Also, each new release
maintains migration paths and updates so that your Plone site will keep working and stay up-to-date.
Internationalization
The whole Plone user interface is translated into more than 20 languages, including Korean, Japanese, French, Spanish, and
German. Inserting your own translation is easy (see Chapter 4).
Usability
Plone offers an excellent user experience that provides high levels of usability and accessibility. This isn't just a matter of
presenting pretty HTML but instead goes to the core of Plone. Plone provides an interface that's compatible with the industry and
government standard WAI-AAA and U.S. Section 508. This allows sites built with Plone to be used by people with vision
disabilities. In addition, this provides the unexpected but related benefit that your page may index better in search engines such as
Google.
Skinnable
Plone separates the content from the actual templates used to present the content, often called skins. The skins are written in the
excellent HTML templating system, Zope Page Templates, and a large amount of Cascading Style Sheets (CSS). With little
knowledge of Plone, you can apply multiple skins, achieve multiple looks, and totally customize your Web site's appearance.
Registration and Personalization
Plone features a complete user registration system. Users register with a Plone site using their own username, password, and any
other information you might want to add about the user. You can then personalize the whole user interface for that user. In
addition, with add-ons, you can use information you already have about users, coming from many places, such as relational
databases, Lightweight Directory Access Protocol (LDAP), Active Directory, and more. Chapter 8 covers how to register and
configure users.
Workflow and Security
Workflow controls the logic of processing content through the site. You can configure this logic through the Web using graphical
tools. Site administrators can make sites as complex or as simple as they'd like; for example, you can add notification tools such
as sending e-mails or instant messages to users. Chapter 8 covers workflow in great detail.
For every item of content in a Plone site, you can set up access control lists to decide who has access to that item and how they'll
be able to interact with it. Will they be able to edit it, view it, or comment on it? All this is configurable through the Web (see
Chapter 9).
Extensible
Since Plone is open source, it can be easily altered. You can change and configure almost any aspect of Plone to suit your needs.
Countless packages and tools for Plone provide a wide array of options for smaller sites and for large-scale enterprises.
Repositories of free add-ons for Plone are available at http://www.plone.org [http://www.plone.org] . With development tools
such as Archetypes (covered in Chapter 13), you can generate and alter Plone code easily through the Web or using Unified
Modeling Language (UML) tools. Chapter 10 covers integration of Plone with enterprise solutions such as LDAP, Apache,
Microsoft Internet Information Services (IIS), Macromedia Dreamweaver, and so on.
Content Customization
Users of a Plone site can add all manner of content, but the data added isn't limited or constrained. Plone developers can create
their own content types so that almost any type of content can be managed; the only limit is your own imagination. In Chapters 11
and 12, I'll discuss how to customize the content types. Chapter 13 will introduce Archetypes, which is a very powerful system for
generating content types that don't require programming; for instance, you can generate new types of content from UML tools.
Documentation
The Plone project maintains documentation, including this book, which is published under the Creative Commons license. The
best starting place for the community documentation is at http://www.plone.org/documentation
[http://www.plone.org/documentation] .
Community
One of the best things about Plone is the community of developers and companies that supports and develops Plone. With more
than 60 developers involved to some degree in the project around the world, it's almost always possible to find a Plone developer
online who is willing and able to help you. Alan Runyan, Alexander Limi, and Vidar Andersen started Plone; however, it quickly
grew into a thriving open-source project as more developers became involved. The contributions from these developers form the
Plone product that's now available.
Example Plone Sites
Many Plone sites exist; some are obvious because of their looks, and some aren't. The following is just a small sample of the more
diverse sites:
Plone (http://www.plone.org) Plone Demo Site (http://demo.plone.org) Zope.org (http://www.zope.org)
Liquidnet (http://www.liquidnet.com) Design Science Toys (http://www.dstoys.com) Give Kids the World
(http://www.gktw.org) Propane (http://www.usepropane.com) Maestro Headquarters
(http://mars.telascience.org)
More Plone sites are available at http://www.plone.org/about/sites [http://www.plone.org/about/sites] , including sites that
provide a quite different user interface. Without knowing about the development of these sites, it would in fact be hard to tell that
these sites use Plone.
Getting Involved in Plone's Development
Although Plone has an impressive list of features, its list of 'wants' even more impressive. For this reason, the project is always on
the lookout for new people willing to contribute time for the project.
Fortunately, because Plone is focused on the end user, there's a need for a very broad spectrum of disciplines. Volunteers in a
range of areas, rather than just coders or Web developers, are welcomed. Plone needs user interface developers, usability experts,
graphic designers, translators, writers, and testers. You can find the current development status on the Plone Web site at
http://plone.org/development [http://plone.org/development] , and the best way to get involved is to join the mailing lists or join
the developers on an Internet Relay Chat (IRC) channel.
Plone is built on top of Zope and the Content Management Framework (CMF). To understand Plone, you have to understand Zope
and the CMF as the underlying architecture. For this reason, I'll explain these two items and how they integrate with Plone in this
section.
Zope is a powerful and flexible open-source Web application server developed by Zope Corporation
(http://www.zope.org [http://www.zope.org] ). Originally, Zope was developed as a stand-alone CMS, but over time it
didn't satisfy the needs of its users. Then Zope Corporation developed the CMF an open-source project. The CMF
To change the maximal image width select one of the following: medium
Up to table of contents [http://docs.neuroinf.de/PloneBook]
<< 2. Installing >> 4. Making Simple Customizations >> [http://docs.neuroinf.de/PloneBook/ch4.rst?image_scale=medium]
Plone << [http://docs.neuroinf.de/PloneBook/ch2.rst?image_scale=medium]
3. Adding and Editing Content
Chapter 3
Adding and editing content is a simplification of the sheer power that Plone has available to leverage. Creating content-rich and
feature-rich Web pages with Plone is an absolute breeze. If you have Plone installed locally, then this chapter shows you how Plone
works straight out of the box. However, if you don't have Plone installed, then don't worry; you can try Plone online by going to
http://demo.plone.org [http://demo.plone.org] .
Before you can alter or edit a Plone site, you need to log into a Plone site. If you installed Plone, you should have the username
and password that came with the installation. This user has the role of an administrator user, which allows you to log in and alter
any content. Most users of a Plone site will join the site and log in through the login process described in the 'Joining a Site'
section. Users can, of course, view a Plone site without logging in, but they won't be able to add or edit content.
In this chapter, I'll go through the steps a user takes to create content on a Plone site. First, I'll cover how to join the site and log
in. Once you've accomplished this, I'll cover how to create and then edit a document. Finally, I'll show how you can search and
publish this content. In short, this chapter covers how to use Plone.
Joining a Site
When you join a Plone site, you create an account on the server. That account gives you the right as a member to add content
such as images, documents, and so forth. To join a site, click the join link in the top-right corner of the Web site (see Figure 3-1).
[img/3294f0301.png/image_view_fullscreen]
Figure 3-1. Clicking the join link in the top-right corner of the page
This will take you to a registration form that you'll have to complete (see Figure 3-2). Because this is the first Plone form you've
encountered, take note of the following:
Some fields are required; a little red box next to the text indicates the required fields.
For most fields, some grayed-out help text beneath the field name indicates what you should enter.
[img/3294f0301.png/image_view_fullscreen]
Figure 3-2. The registration page
NOTE Because many of the Plone pages are quite large, the figures in this book have been cropped to show only the
key parts (in this case, the form) and not the Plone logo or the footer. These elements are still there, but they're
superfluous.
To complete the form, complete the fields that are reasonably obvious. The values of the fields are as follows:
Full Name: Enter your full name. This field is optional.
User Name: Enter the username you want to use. Most people choose an alphanumeric value without spaces, such
as bob or jane97. This username will be used throughout the Web site to refer to you. This field is required.
E-mail: A valid e-mail address is required. This will allow the site administrator to contact you and to send a
password to you. You can change this e-mail address later by editing your member preferences. This field is required.
Password and Confirm Password: This is the password you want to use; it must be more than four characters
and can contain letters, numbers, and the underscore (_) character. Passwords are case sensitive (in other words,
SomePassword isn't the same as somepassword). These fields are required.
Send a mail with the password: Check this box if you'd like your password sent to the e-mail address you
provided. This field is optional.
Once you've completed this form, click Register to submit your information. If you've made any errors on this form, then you'll see
a message at the top and the key fields that have an error highlighted. In Figure 3-3 I entered a password but didn't enter a value
for the Confirm Password field. Again, this is the standard way that Plone forms will show errors to you.
[img/3294f0303.png/image_view_fullscreen]
Figure 3-3. Errors on a form
If you've completed the form correctly, then you'll be given the option of logging in immediately. Click the Log In button to log in.
You'll see the page shown in Figure 3-4.
[img/3294 f0303.png/image_view_fullscreen]
Figure 3-4. After registering
If you already have a username and password or are returning to a site you've previously joined, then you can enter your name
and password in the boxes in the left column of the site and click the Log In button.
Enabling Cookies
To log into a Plone site, you must have cookies enabled. If you access a Plone site and try to log in with cookies disabled, you'll get
a friendly message telling you that cookies must be enabled with a link to more information. To enable cookies, perform the
following steps, depending on your browser.
Internet Explorer 6.x
1. Select Tools > Internet Options.
2. Click the Privacy tab at the top of the screen.
3. Move the slider to Medium, and click OK.
Internet Explorer 5.x
1. Select Tools > Internet Options.
2. Click the Security tab at the top of the screen.
3. Click Custom Level, and scroll down to the Cookies section.
4. Set Allow Per-Session Cookies to Enable, and click OK.
Internet Explorer 4.x
1. Select View > Internet Options.
2. Click the Security tab at the top of the screen.
3. Click Custom Level, and scroll down to the Cookies section.
4. Select Always Accept Cookies or Prompt Before Accepting Cookies, and click OK.
Mozilla 1.x
1. Select Edit > Preferences.
2. Find Privacy & Security in the menu on the left. If there’s a plus sign (+) to the left of Privacy & Security, click it.
3. Select Cookies under Advanced.
4. Select Enable Cookies for the Originating Web Site Only or Enable All Cookies, and click OK.
Opera
1. Press F12.
2. Click Enable Cookies.
Netscape Navigator 6.x
1. Select Edit > Preferences.
2. Find Privacy & Security in the menu on the left. If there’s a triangle pointing to the right next to Privacy & Security,
click it.
3. Select Cookies under Privacy & Security.
4. Select Enable Cookies for the Originating Web Site Only or Enable All Cookies, and click OK.
If you forget your password at some point, you can get it sent to the e-mail address provided when you registered with the Plone
site. To have your password mailed to you, click the Forgot your password? link located in the left column of the Web site. This
will bring up the forgotten password form, as shown in Figure 3-5; enter your login name, and a password will be e-mailed to
you.
[img/3294 f0305.png/image_view_fullscreen]
Figure 3-5. Getting a forgotten password
Unfortunately, if you have no longer access to that e-mail account, or you can't even remember the username, you'll have to
contact a site administrator. Using the techniques discussed in Chapter 9, the administrator can change your e-mail and find your
user account. Once logged in to the Plone site, you'll see a log out link in the upper-right corner. When your work is finished, it's
good practice to log out of Plone site, especially if you're accessing it from a computer that's likely to be used by other people.
Setting Up Your Folder and Preferences
After you've logged in, the member bar in the top-right corner will change to represent the options available to you as a member
of the site (see Figure 3-6).
[img/3294f0306.png/image_view_fullscreen]
Figure 3-6. Your personal choices in the top-right corner have changed.
One of these options is that each member has a folder created for them when they join a site. This folder is set up with particular
security so only that member (and administrators) can add and edit the content in that folder. To access your personal folder,
click the my folder link in the personal bar in the upper-right corner of the site. In the upper-right corner you'll also see a my
preferences link; clicking this will open a list of personalization options. You'll see two choices at the moment; you can change
your password, or you can go to the personal preferences and change key preferences in your site.
The change password form allows you to change your password. To complete the form, give your current password and the new
password twice. After you've changed your password, the change will be immediate. You don't have to log in again; just remember
your new password when you return.
The personal preferences form allows you to set a number of preferences that change how you see the site. These preferences are
stored on the server so they're retained between uses of the site (see Figure 3-7).
[img/3294f0306.png/image_view_fullscreen]
Figure 3-7. Changing preferences
The options are as follows:
Full name: This is the full name you gave when you registered with the site.
E-mail: This is the e-mail address associated with your membership and is used a number of places in a Plone site.
Most important, if you lose or forget your password, this is the address to which the system will send it.
Content editor: When editing complex content, you may want the help of an editor. If your site administrator has
made one available, you can select it here. It will then be used when you click the edit tab of an object. If you're
unsure, leave this as the default.
Listed status: This property specifies whether your profile will show up on the members tab and when someone
searches the members listing.
Editing of Short Names: Objects have an ID or Short Name property that's used for the internal representation of
the content object. This also shows up in the item's Web address and the item's Uniform Resource Locator (URL). By
default these look something like News_Item.2002-11-16.4102, but you could make it much simpler, such as
november_news, by changing the Short Name value.
NOTE When you change an object's name value, anything that references the older name will no longer be valid and
will result in the page not being found. It's best not to change the name value after you submit an object for review or
link to it from elsewhere. For this reason, I recommend setting this option to No.
Portrait: In larger organizations and in community Web sites, it's useful to see pictures of other members. The
Portrait field allows you to upload a picture of yourself. The picture should be 75 by 100 pixels.
Once you've made the desired changes, click the Save button to commit the changes. Now that you've logged in, it's time to start
adding and editing content.
Adding and Editing Documents
As mentioned, now that you're a site member, a folder has been created for you where you can store content. Of course, you can
add content to any folder that the site administrator has given you the right to do so, but by default every user can add content to
their member folder.
Each type of content you can add is distinct, and you can edit and view it in different ways. For this reason, Plone references each
type of content differently; for example, you can add images, links, documents, and so on. Out of the box, Plone provides the
following content types:
Document : This is an item that presents some static information to the user. This is the most common type of
content added and most closely represents a typical Web page.
News item: This is a document that's to be shown under the news tab (for example, a press release).
Link : This is a link to another item, which may be internal or external to another Web site.
Image : This is an image, such as a .gif or .jpeg file.
Event : This is an upcoming event, meeting, conference, or other event.
Folder : This is like a folder on a hard drive; this is a folder for putting content into so that it's easy to find later.
Topic: This is a grouping of other content. This is essentially a saved search criteria that you can reuse later.
Only privileged site users can add topics.
File : This is another piece of content such as a movie, sound clip, text file, spreadsheet, compressed file, or
anything else you'd like to upload.
I'll go through each of these items using the document as an example, showing in detail how to add and edit documents easily and
quickly. Using these basic content types, I'll show you how to build a dynamic site through a browser, without doing any
programming.
Actually, you have many ways of adding and editing content in a Plone site than just through a Web browser. Access via File
Transfer Protocol (FTP), via Web-based Distributed Authoring and Versioning (WebDAV), or via scripts is all possible. I'll discuss
how to set these up in Chapter 10 and just deal with the Web browser interface for now. In Chapters 11 to 13 of this book, I'll
discuss how to make new custom content types that you can tailor to a particular site's needs.
Understanding the Document Content Types
Rather than detailing how to add and edit all the different types of content available, I'll cover adding one type of content, a
document, in detail. After adding and editing a few of these documents, the approach to adding content should be second nature,
and editing other content will be easy.
A document is a page of content, usually a self-contained piece of text. Although all items added to Plone are accessible as Web
pages, if there's one content type you could think of as a Web page, this is it. The default home page for a Plone site that you've
seen already - the now-famous Welcome to Plone page - is one example of a document (see Figure 3-8).
[img/3294 f0308.png/image_view_fullscreen]
Figure 3-8. Welcome to Plone, a simple document
Adding a Document
You have two ways to add any piece of content using a Web browser. First, ensure you're logged in, because only logged-in users
can add content. Second, select the my folder link from the top-right navigation bar. This will take you to your home folder, an
area that you control. If you're able to add content to a folder, then the folder will show up with the green border around the top
(see Figure 3-9).
[img/3294f0309.png/image_view_fullscreen]
Figure 3-9. My content
If the green border doesn't appear, then you won't be able to add content; this border contains the actions you can perform in the
current location. In Figure 3-9, you can see that the page shows the contents of the folder, because that's the highlighted tab.
Other tabs appear such as view, sharing, and properties for more advanced options. In the top-right corner of the green border,
you'll see an Add New Item drop-down menu and a State drop-down menu. Click the Add New Item menu to open a drop-down
list of items to add (see Figure 3-10).
[img/3294f0309.png/image_view_fullscreen]
Figure 3-10. Adding a document from the green drop-down menu
To add a new document, select Document. Alternatively, if you look in the body of the page, you can see another Add New Item
drop -down box. Again, click the down arrow to open a list of items that can be added and then select the item you'd like to add
(see Figure 3-11).
[img/3294f0309.png/image_view_fullscreen]
Figure 3-11. Adding a document from the main folder's content menu
Using the Add New Item list from the green border is a handy menu since it's available most of the time.
NOTE **If you're familiar with Zope, you should never, never, never add content from the Zope
Management Interface (ZMI). Depending upon how you've installed Plone, you may have already seen
the ZMI and used it for customizing and developing Plone through the Web. However, adding content
through the ZMI will create content items that are incomplete and don't ***Begin Sidebar*
Understanding Where to Add Content
The easiest place to add content at the beginning is in the user's member folder, accessible by clicking the my folder link.
Although this is useful, it's probably not the best approach for a long-term solution. Most noticeably it creates long URLs (for
example, /Members/andy/Docum....). It also means your content isn't accurately reflected in the navigation tree.
As you'll see later, a few solutions exist for this; the most common solution is to make a folder and give certain users the right to
access it. For example, that folder may be Help or News. The 'Using Folder” section later in this chapter discusses adding folders,
and Chapter 9 discusses using group workspaces and security.
Editing a Document
Once you've clicked to add a document, you'll be taken directly to the edit page with a message telling you that the document has
been created. If this doesn't happen, you can click a document and then click the edit tab. Again, you'll see that the edit tab
becomes highlighted in green (see Figure 3-12).
[img/3294 f0312.png/image_view_fullscreen]
Figure 3-12. Editing a document
Now you can edit the document in your Web browser, using the form provided. If you look at the URL in the address bar of your
browser, you'll note that a short name for the object has been created for you, something such as Document.2003-12-29.43787.
The following is a list of the fields and their meanings:
Short name: The short name will become part of the document's URL, so keep the name short and descriptive,
preferably without spaces. Keeping to these rules will make URLs easier to read. For example, use something such as
audit -report-2003 . If you don't provide a name, Plone will create one for you.
NOTE This field won't appear if you selected No for the short names in your preferences page.
Title : This is the title for the item, and it'll be shown throughout the site (for example, at the top of the page, in the
Title: This is the title for the item, and it'll be shown throughout the site (for example, at the top of the page, in the
search interface, in the title of the browser, and so on). This field is required.
Description: This is a short lead-in to the document, usually about 20 words to introduce the document and provide
a teaser for the remainder of the document. This is useful for pages that show summaries of documents, such as
search results and folder contents.
Body text: This contains the body of the document. The format for the content is set using the Format field
(described next).
Format : You have three choices for the format of body content: Structured Text, HTML, and Plain Text. These types
of text are discussed in the 'Choosing a Text Format” sidebar; if you're unsure, leave this field alone and type the body
text as usual.
Upload document: If you do have your document as a file on your computer, you can upload it instead of typing the
content into the Body Text field. Use the Upload button at the bottom of the page to select a file. The contents of an
uploaded file will replace any content in the Body Text field.
Once you've finished editing your document, click the Save button to commit your changes. You'll be returned to the view tab
where you can see how the document will be shown to users (see Figure 3-13); to edit it again, click the edit tab.
[img/3294 f0313.png/image_view_fullscreen]
Figure 3-13. Saving the content will take you to the view tab.
If you don't provide the correct input on the edit form, when you save the document you'll be returned to the edit page, and your
errors will be highlighted. At this point your changes haven't been applied—you must correct the mistakes and click Save again
before the changes will be committed. The view tab shown in Figure 3-13 shows the document you've created. You'll see that the
title, description, and content are all shown in slightly different styles. At the bottom of the page is a byline that contains
information about the author of the document, including the date the page was created.
You'll note that if you go back to folder contents after saving your changes, you'll see two documents in your folder: the existing
one that's created for you and the new one you've just added. You can edit either of these documents by clicking them to open the
view tab, which allows you to select the edit tab.
Choosing a Text Format
As mentioned previously, you can edit the document content in at least three formats: structured text, HTML, and plain text. This
rather confusing state of affairs is brought about by trying to produce easy systems for users to write rich marked-up content in
plain text without having to use fancy editors.
Unfortunately, in most cases, this really doesn't work; training is required to understand the formatting. Structured text requires
quite a bit of understanding in itself because it has a frustrating syntax and doesn't internationalize well. If I had to pick one
format that I'd recommend over all the others, I'd pick HTML because it's widely understood, and you can use What You See Is
What You Get (WYSIWYG) editors such as Epoz to produce it.
*HTML* HTML is the most standard format; if a document is entered as HTML, it will be rendered in the same format. This
HTML shouldn't be a complete page but rather a snippet. For example:
< p > H e r e is a sample in <i>HTML</i> for a demonstration.</p>
Ideally the HTML should also be valid Extensible HTML (XHTML) to comply with the rest of the Plone system; if it's not, your
pages don't comply with Web standards. Entering text as XHTML isn't for the faint of heart, so in Chapter 9, you'll see how into
integrate rich-editing tools into Plone that allow users to easily write content in XHTML. The following screen shot shows Plone
using Epoz so users don't have to understand HTML:
*production: please note that I've named sidebar graphics with an 's”*
[img/3294s0301.png/image_view_fullscreen]
*Plain Text* Plain text is simple. It does no major conversion or manipulation of the text entered; it's just plain text. The only
modification made is that new lines are converted into HTML when rendered so that new lines appear in the Web browser. No
other altering happens. For example:
H e r e is a sample in plain text for a demonstration
*Structured Text* Structured text is a system for writing plain-text documents in a particular format, which can then be
interpreted in different ways. For example, if a piece of text needs to be highlighted, then it can written as italics; this will then
be shown as italics. This series of rules means that a user can write a page that contains formatting information easily. For a full
list of structured text rules and examples, please see Appendix A. The following is a sample of structured text:
H e r e is a sample in *structured text* for a demonstration
Setting Document Metadata
Any piece of content can have any number of properties assigned to it. These properties are known as metadata and provide
information such as keywords, copyrights, and contributors of an item.
This entire set of properties is optional and is usually used only if there are special requirements for this piece of content,
especially since this information isn't normally shown to the person viewing the content. So the main reason for entering this data
is to add information for tasks such as searching or categorizing the content.
You can access properties on an object by selecting the green properties tab. This properties form has the following fields, which
are common to all content types:
Allow Discussion: This lets this document be discussed by users who have the right to do so. If the value is left as
default, it'll use the sitewide policy for that content type.
Keywords : Each item can have keywords assigned to it to enable grouping and sorting of the items. For example, an
article about recent events in politics may have the keywords politics and prime minister. Keywords are flexible, and
you can use any keyword from the given list. By default there are no keywords in the Plone system; site administrators
may add new keywords so that other users can select them.
Effective Date: The effective date is the first day a piece of content should be available. You can specify this date by
entering the values in the form or clicking the little calendar icon, which opens a calendar, and picking a date (see
Figure 3-14).
[img/3294f0314.png/image_view_fullscreen]
Figure 3-14. Entering an effective date
Expiration Date: The expiration date is the last day a piece of content should be available. Usually the Effective Date
and Expiration Date fields are left blank.
Format : This is the Multipurpose Internet Mail Extensions (MIME) type of the item. The term MIME type refers to a
computer definition of the type of content (for example, application/msword or image/jpeg). This is set at a default
value; if you're unsure about this field, just ignore it.
Language: This is the language in which the document is written; the default is English.
Copyright : This is the copyright information for the content, which is usually blank.
Contributors : This includes the names of the people outside the Plone system who contributed to the object. Each
person's name should be on its own line.
After completing the values for this form, click Save to commit the changes. As stated, usually you won't need to edit the values on
this tab. Editing the contents of this tab is usually based upon the requirements for your site and the type of site you're building.
What Are Effective and Expiration Dates?
Any item in the Plone system can have effective and expiration dates if the person editing the content wants. Both of these are
optional, and leaving the fields blank will ensure that these values aren't set.
One example of an item that may have an effective date is a press release. In the ideal world, the news item is crafted, prepared,
and reviewed in Plone. However, suppose the news item has to go live on the Web site at midnight, but that's exactly when you
plan to be sleeping. Not a problem—give the press release an effective date and a time of midnight. Up until the effective date, it
won't be visible in the calendar, in navigation, in searches, or in pages that use a search as the listing under the news tab.
However, anybody who knows about the press release will be able to access the page directly. Once the effective date has passed,
the item will appear in all the aforementioned places and be live to the world.
The effect is similar with expiration dates. If you have a special offer that stops being effective on a particular day, then you could
set an expiration date of that day. After that, date it wouldn't appear in calendar, navigation, searches, and so on.
The effective and expiration dates don't actually change the state of the item in workflow (see Chapter 7 for more information on
workflow); rather, they just change where it displays. You can also set effective and expiration dates on the state tab, which you'll
learn about in the next section.
Publishing Your Document
When a document is created, it's given an initial state, called visible. By default, content isn't automatically published and
available to the world; instead, others can view your content, but it doesn't show up in searches or the navigation tree. This is a
useful state because you can point other users to this content, but because it won't show up in navigation or searches, it's not
visible unless users know about it.
At any point in time, each item of content in your Plone site is in a particular state. This state describes its permissions and roles
within the Plone site. By having items in different states, it's possible to apply different security to each item of content. For
example, sometimes an item may take a week or two to prepare and involve multiple revisions. Eventually you'll want to publish
the content so that it's visible for all users and shows up in the navigation and search.
You can publish the content using the State drop-down menu located at the top right of the main navigation (see Figure 3-15).
[img/3294f0315.png/image_view_fullscreen]
Figure 3-15. State drop-down menu
To publish an object, select Submit from the drop-down menu. By default you can't directly publish content, but you can submit it
for review. When an item is submitted for review, it moves into the review state. This is an intermediary state between visible and
published. It allows for the review of content by users of your site with the reviewer role, before it goes live for the entire world to
see. After you've submitted the content, you'll notice that the content is now in the review state by looking at the box in the top-
right corner. You'll also notice that in Figure 3-16, there's no longer an edit tab.
[img/3294 f0315.png/image_view_fullscreen]
Figure 3-16. The content has been submitted for review, the state has changed to pending, and the edit tab is no longer an option.
NOTE If you're logged in as a manager, then you'll note there will be one extra option in the drop-down publishing list called
Publish. This lets you put content straight into the published state with no intermediate step.
In the workflow drop-down list in the top-right corner, there's also an option for Advanced, which opens the state form for
changing the status of an object. This form is the same as clicking the state tab. It has the following fields:
Effective Date: This is the same as the Effective Date field in the properties (see the 'Setting Document Metadata'
action).
Expiration Date: This is the same as the Expiration Date field in the properties (see the 'Setting Document
Metadata' section).
Comments : This includes any comments you want to make for this change in state that will be recorded in history.
For example, you could enter First draft; Bob, please see second paragraph.
Change State: These mirror the choices available in the drop-down menu. For example, the options are Publish,
Submit, and so on. One further option, No Change, is available if no change is necessary.
Select the change of state you'd like to occur, and click Save to commit the changes.
What Are the Workflow States?
At this point you may be asking yourself what this workflow thing is and what the states mean. Workflow, as discussed in Chapter
7, is the ability to apply different states to the content. The following are the default states:
Visible : Content is created in the visible state. All users can find visible content through the search function and can
access it directly by visiting the object URL. Visible content doesn't show up in the navigation tree. Visible content is
editable by their owners and site managers.
Pending: Pending content includes items that have been submitted for publishing by site members. From a user
standpoint, pending content behaves like content in the visible state. The difference between the two types is that
pending items are flagged for review; site reviewers are prompted to publish or reject pending items. Pending items
are editable only by managers and reviewers.
Published : Published items are visible to all site visitors. They appear in search results and the navigation tree. They
may also appear in other areas specific to that type (news items, for example, also appear when you click the news
tab). Published items are editable only by managers, but owners can retract them for editing (retracting reverts an
item to the public draft state).
Private: Items in the private state are visible and editable only by their owners and others with manager access to the
folder in which they exist. They won't appear in search results or on the navigation tree for other users. Private items
are editable by managers.
How Does Content Get Reviewed?
If you're a reviewer, then in the right column of the home page you'll see a new review list when you first log in. This is a list of
the items that have been submitted for review and need reviewing by you or another reviewer (see Figure 3-17).
[img/3294f0317.png/image_view_fullscreen]
Figure 3-17. The review list
The review list will appear on the right when you log in as a user with the review role and there are items to review. In my case, I
logged in as admin, which was the user created during my install process. You can tell you're logged in because your name will
appear in the member bar. The review list gives a list of items to review - in this case, you need to review the test document. Click
the document to open the item. At this point you essentially have the following choices for this item:
Reject it: Reject it by selecting Reject from the drop-down choices. This will move the content back into the visible
state and assumes that as a reviewer you're unhappy with it. Usually you may want to click the Advanced option to
open the comments form and add some comments stating why you're rejecting it.
Approve it: Approve it by selecting Publish; this will change the content into the published state. This will make the
content publicly available.
Do nothing: Leave it by doing nothing. This leaves the content in limbo but sometimes happens when you need to
check information or talk to others. Eventually you should return to do something with this content because it'll
continue to show up in your list of items until you make one of the previous actions.
Edit it: Edit it, and then perform one of the previous actions. As the reviewer, you can make any change you'd like to
do, so feel free to change the content by using the edit tab.
Once you've moved content out of the review state by publishing or retracting it, it will no longer show up in the review list. Of
course, this assumes you do have someone as a reviewer for your site; this usually (although not necessarily) is also the user who
created the Plone site as an administrator. In Chapter 8, I'll discuss how to add and edit users and give some users the review role.
How Do You Edit a Published Document?
Once a document has been published, it must be retracted to be edited. To do this, select Retract from the workflow drop-down
menu, which will move the item back into the visible state. Once it has returned to the visible state, you can reedit it and placed it
back into the review queue.
This step, although a little annoying, is necessary to ensure that all content goes through a review step. For example, you have to
ensure that any edits made to a page are appropriate by reviewing the content. Users with the manager role can edit the content at
any time, so they can quickly go in and fix a typo without having to go through the review step. It's assumed that users with a
manager role are trustworthy! If you're a manager, as defined in Chapter 9, you can go to any piece of content and will see the
edit tab. At that point, click Edit to alter the document and make your changes.
Sharing Your Document
This allows you to assign more rights to other users or groups of users of the system to your document. This is an advanced feature
and is covered in more detail in Chapter 9.
Adding and Editing Other Types of Content
I've just covered how to add and edit documents in detail. All the other content types are similar. They all have the same or
similar actions to edit; it's just the forms and the data in them that change. In the following sections, I'll cover some of these other
types of content. All the following types of content use the same workflow process, so they need to be published in the same
manner as documents.
Adding and Editing Images
Images are graphical pieces of content; you add them by selecting Image from the drop-down list. When you add an image, the
name of the content changes to the file of the image. So, if you upload an image called photo.gif, it'll be accessible in Plone as
photo.gif . When adding or uploading a new image, you can select the image from your hard drive by clicking the Browse button
and selecting the file (see Figure 3-18).
[img/3294f0318.png/image_view_fullscreen]
Figure 3-18. Uploading an image
It's common for image filenames to end with an extension such as .gif, .jpg, .jpeg, .png, or .pict. You can display images inside
Plone on a Web page without having to download them to the local computer if the type of the image uploaded is viewable in the
user's Web browser. The most common image types are .gif, .jpg, and .png, which are visible on almost computer system. Figure
3 -19 shows an image of the Plone logo.
[img/3294 f0318.png/image_view_fullscreen]
Figure 3-19. Viewing the image
You can't edit images directly; instead, you can edit the image on your hard drive using any program, such as Adobe Photoshop or
GNU Image Manipulation Program (GIMP). Once complete, clicking the edit tab allows you upload your new image into Plone. If
you do a lot of image manipulation, you can refer to Chapter 10, which covers External Editor, a tool that lets you edit images
using a program without having to upload and download them.
Adding and Editing Files
A file is any arbitrary file that can be uploaded from your hard drive. To add a file, select File* from the drop-down list. On the
edit tab, you'll see an Upload button that lets you pick the file from your hard drive. This could be any sort of item, including a
plain-text file, a Microsoft Word document, a Microsoft Excel spreadsheet, an executable program, an Adobe Acrobat document,
and so on. When you add a file, the name of the item in Plone changes to the name of the file uploaded. So, if you upload a file
called *book.pdf, it'll be accessible in Plone as book.pdf. Figure 3-20 shows a plain-text file.
[img/3294 f0320.png/image_view_fullscreen]
Figure 3-20. Adding a plain-text file
If the file is recognized as being text, then the contents of the file are shown in the Web page and are editable through the edit
tab. Otherwise, the file is downloadable, and users must download it to their local hard drive and edit it there. Afterward they can
upload it to the system. You'll note that a file object also has an extra download tab that lets you directly download the file.
Adding and Editing Events
An event can be something that will happen in the future or something that happened in past. You can add events to Plone, and
they show up on the calendar. To add an event, select Event from the drop-down list. An event has more information than most
Plone objects; however, most of it is self-explanatory (see Figure 3-21).
[img/3294f0321.png/image_view_fullscreen]
Figure 3-21. Adding an event
As usual, the only required field is Title; however, if you want the event to show up in the calendar, then you must provide a start
and end time. Events can span multiple days or be in the past—as long as the start date is before the end date. To enter a date,
select the appropriate dates from the drop-down menu, or click the little date icon to open a graphical date picker.
Once the event is published, it'll show up in the calendar. Moving a mouse over the item in the calendar will show the start and
end dates for the event, as well as the event's title (see Figure 3-22).
[img/3294f0321.png/image_view_fullscreen]
Figure 3-22. Viewing events in the calendar
Adding and Editing Links
Link content types are the primary way for users to share links. These URLs can be resources on the Internet or an intranet, an
internal resource, or anything to which the users have access. To add a link, select Link from the drop-down menu.
If you're going to link to an Internet resource, you should preface your link with the suitable protocol (for example, http://). For
If you're going to link to an Internet resource, you should preface your link with the suitable protocol (for example, http://). For
instance, if I was visiting an interesting page on the BBC's Web site and wanted to share this, I could add a link. The value of the
URL will be the text in the address bar (for example, http://news.bbc.co.uk [http://news.bbc.co.uk] ), as shown in Figure 3-23.
[img/3294 f0323.png/image_view_fullscreen]
Figure 3-23. Adding a link
Adding and News Items
News items are commonly used in Web sites to display news that's of interest to the reader. Actually, a news item contains the
same information as a document. The only real difference is that a news item will show up when a visitor clicks the news tab
(once the item is published), as shown in Figure 3-24.
[img/3294f0324.png/image_view_fullscreen]
Figure 3-24. A list of news items
If I wanted to write a Web page that was going to be relevant for a long period of time, such as directions to my company's office,
I'd use a document. If I wanted a page that detailed my exciting new product and drew attention to it, I'd use a news item. That
news item would be visible under the news tab, and as new things happened, it'd slowly move down the page.
Organizing Content
So far you've seen how to add and edit content in a Plone site, but without clear organization, this can become a mess quite
quickly. You have two main ways of organizing content: folders and topics. A folder is the simplest and most powerful mechanism
for organizing content and works just like a folder or a directory on a computer's hard drive. A folder can contain any item of
content; content can be copied and pasted between folders, and of course folders can contain other folders.
To organize content that's spread all over a site, a more sophisticated and less-used tool called a topic is available. A topic searches
your Plone site and finds all objects that match a certain criteria, allowing you to group lots of disparate content.
Using Folders
A folder is just like a folder or a directory on a hard drive, except that the folder and its contents exist inside Plone. You use a
folder the same way; when you need to categorize content or make things a little clearer, you can group items and place them in a
folder. To add a folder to your site, select Folder from the drop-down list. This will add a folder and take you to the edit
properties page for that form. A folder has just three rather simple attributes that a user can edit: Name, Title, and Description.
I've discussed all these attributes for documents, and nothing is different for folders.
Folders have two green tabs that represent slightly different views: contents and view. Actually, you may have already noticed that
there's a contents tab accessible from any piece of content that you've added to the site; for example, when you were editing a
document, the contents tab was there. That contents tab will always take you to the contents for that folder.
Viewing the Contents of a Folder
The folder has the concept of a default page, which is a page that will be shown to the user when they view a folder. It's a concept
taken from Web sites where viewing a folder on a Web site shows a default page if one is present; often that default page's name is
index.htm or index.html. If a folder has a default page, then clicking the view tab will show that default page. If the folder doesn't
have a default page, then it'll show a folder listing of all the content in that folder. When looking for a default page to display,
Plone looks through the folder for content with a certain name and shows this item. The page name is usually index.html or
index_html ; however, the site administrator can add or alter these names.
This contents view of a folder allows a user to perform a variety of tasks, such as move content, rename it, delete it, publish it, and
change the order it's listed. As shown in Figure 3-25, you'll also see a simple table of the folder contents. Each row of the table
shows the title of the content (plus an icon), the type, its size, when it was last modified, its current workflow status, and order
selectors. On the left is a checkbox to select the items you want to change and a series of options across the bottom: Rename, Cut,
Copy, Delete, and Change Status. These functions are all pretty self-explanatory, and you can apply them to multiple objects at
once by clicking several checkboxes.
[img/3294f0325.png/image_view_fullscreen]
Figure 3-25. Contents of a folder after I've added some of the content types described in this chapter
For example, to quickly rename a piece of content, click that item's checkbox and then click Rename. This will open the rename
form and allow you to rename the title of each item in that list. Click Save to have the changes take effect. The Cut and Copy
buttons allow you to copy or move content between different folders. The Delete button allows you to delete the item from Plone.
Just like on your hard drive, if you copy, move, or delete a folder, all the contents of the folder will also be moved, copied, or
deleted.
A new feature in Plone 2 is the ability to change the default order of items in a folder. By default, items in a folder will display in
the order the items were added. If one item is more important and needs to be moved to the top, use the arrows on the right side
of the table to move the item. The following features will appear in the folder contents only when certain things happen:
If the content has an expiration date set and it has expired, you'll see the word expired appear in red next to the
item.
If the server has External Editor installed, you can click the pencil to edit in External Editor (this is covered in
Chapter 10).
If the content is locked, you'll see a lock icon appear next to the content.
Publishing a Folder
Folders have a much simpler workflow than documents. Earlier in this chapter you saw how to publish content to make it publicly
visible because this allows users to create and edit content as much as possible before pushing it live. However, folders are a little
different because they contain content but don't have any content of their own. For this reason, folders have no review state.
Anyone can directly publish or make private folders, so there are three states: private, visible, and published.
After adding a folder, select Publish from the drop-down list. Then it'll show up in the navigation. As per the earlier rules for
workflow, if you don't publish a folder, it won't show up in the navigation.
Using Topics
A topic allows you to collect content from disparate places throughout a Plone site and provide it in one location. Topics work by
creating a criterion that's common to all the objects you'd like to gather. This criterion could be all images or all news items with
Plone in the text. Because topics are a rather complicated type of content, only managers can add them initially. If you can't see
Topic in the list of items to add, then you don't have the permission to do so.
To add a topic, select Topic from the drop-down list. After adding the topic, you can create key criteria on the criteria tab. The list
of criteria and types is available in the drop-down box at the bottom of the page. This is a rather confusing list; I won't try to
discuss it here. Unfortunately, what those terms are and what they mean is based heavily on the underlying technology, such as
discuss it here. Unfortunately, what those terms are and what they mean is based heavily on the underlying technology, such as
catalog indexes and object attributes. For this reason, Chapter 11 covers this in detail.
For example, to create a topic that shows all the images, you need to add a criterion that searches for content based on
portal_type. For this, select a field name of portal_type, select String Criterion, and then click Add. These criteria will be added
to the top of the page; in the field to the right of portal_type, enter Image, and then click Save. You now have criteria for your
topic that will show all content that's an image. Returning to the view tab, you can now see all the images on a site.
As stated, topics are quite complicated, have a rather unfriendly interface, and are recommended for only advanced users. Many
people have found topics useful, which is why they're still available in Plone; however, a more user-friendly system will be
developed in the future.
Discussing and Finding Content
Adding and editing content in Plone is much more useful if people can find and then discuss the content. The primary ways users
find content is through searching and navigation. Fortunately, Plone automatically sets up searching and navigation for the users,
so it's easy to find the content you've added.
Adding Comments to Content
Feedback from users is a vital part of any Web site. By allowing users to add comments, you ensure that users can give feedback,
correct typographical errors, or otherwise discuss the content. You can discuss almost any piece of content in Plone; folders and
topics are the only exceptions.
You can enable discussions in one of two ways. First, the owner of the content (otherwise known as the person who created it)
turns on the discussion feature by clicking the properties tab of the object and selecting Enabled under the Allow Discussion on
This Item header, as shown in Figure 3-26. Second, the default option applies the policy for that type of content as defined by the
site administrator; setting this option is described for the administrator in Chapter 10.
[img/3294 f0326.png/image_view_fullscreen]
Figure 3-26. Enabling discussions
Once discussions are enabled, click the Add Comment button to discuss the content, which opens a form for adding the comment
(see Figure 3-27).
[img/3294f0326.png/image_view_fullscreen]
Figure 3-27. Adding a comment to a piece of content
Enter the subject of the comment and the text of the comment. The text is entered as plain text, so just type away as usual.
Comments don't go through any workflow, so comments show up as soon as they've been added. Once a comment has been
entered, it can be replied to, forming a threaded list of comments on an item. Further, comments will be entered in the catalog so
they can be searched.
NOTE Administrators logged in as managers can remove any replies or entire threads. Disabling replies doesn't remove the
comments; it just stops them being shown, so reenabling comments will show the existing comments again.
Searching for Content
Plone contains a powerful search engine system based on Zope's ZCatalog. This search engine allows content to be cataloged in
multiple ways and to be queried efficiently and quickly. Chapter 10 covers the internals of how this works and how it can be
queried.
When you're searching for content, the content will be shown to a user if it's one of the two states: published or visible. At the top
of your Plone site a search box provides an easy way to do simple textual searches in the same way as a search engine (see Figure
3 -28). For example, enter Tuesday to find all content that contains the word Tuesday. A result of all matching content will
display; click the title to get to the content.
[img/3294 f0328.png/image_view_fullscreen]
Figure 3-28. A search for Tuesday on Plone.org
The search provides a quite sophisticated search, with features similar to most search engines. You can make this simple query
quite complex. For example, you can use the following options:
Globbing : You can use an asterisk to signify any letters. For example, entering Tues* matches Tuesday and
Tuesdays . You can't use the asterisk at the beginning of a word, though.
Single wildcards: You can use a question mark anywhere to signify one letter. For example, entering ro?e matches
rope, rote, role, and so on. You can't use the question mark at the beginning of a word, though.
And: You can use the word and to signify that both terms on either side of the and must exist. For example, entering
Rome and Tuesday will return a result of when both those words are in the content.
Or : You can use the word or to signify that either terms can exist. For example, entering Rome or Tuesday will
return a result of when either of those words are in the content.
Not : You can use the word not to return results where the word isn't present; a prefix of and is required. For example,
entering welcome and not page would return matches for pages that contained welcome, but not page.
Phrases : Phrases are grouped with double quotes (' ”) and signify several words one after the other. For example,
entering 'welcome page” matches This welcome page is used to introduce you to the Plone Content Management
System, but not Welcome to the front page of my Web site.
Not phrase: You can specify a phrase with a minus (-) prefix. For example, entering welcome -'welcome page”
matches all pages with welcome in them, but not ones that match the phrase welcome page.
NOTE All searches are case insensitive.
Large sites may have a lot of results, so only 20 results display at a time. To page through the results, navigation bars will appear
at the top and the bottom of the search result pages. The values on an object used in a search are its title, description, and body
text (if the content type has any—for example, news items and documents).
Performing an Advanced Search
You can narrow down the search results by using an advanced search, which is accessible via the search results of a standard
search. In old Plone sites, a search tab brought users to this page; you can reenable this tab if you want, as covered in Chapter 4.
The advanced search form enables a user to query content using a number of attributes, including title, keywords, description,
review state, creation date, content type, and even author, as well as the search text (as used in the quick search available from the
top-right corner), as shown in Figure 3-29.
[img/3294f0329.png/image_view_fullscreen]
Figure 3-29. Advanced search
Although the search text field searches both the title and description, you may want to search the description or title only. For that
reason, these fields are presented on the advanced search form. You can't search the title and description using the wildcards,
globbing, or any of the advanced search options. Any search result will match the input (if given) of all the fields; the results will
be an intersection of all the terms.
Example: Creating the Plone Book Web Site
To give an example Plone site and provide a series of examples, I set up a Web site for this book. This is a Plone site with a few
minor modifications. As I go through the book, I'll make references to the site and add new features as they're covered in the
book, including new templates, skins, and so on. The Web site for this book is at http://plone-book.agmweb.ca [http://plone-
book.agmweb.ca] ; initially I set this site up on Windows server, as described in Chapter 2. However, I later transferred it to Linux.
The site serves the following purposes:
It gives people a place to get information about the book and buy it.
It allows easy access to the software used in the book.
It gives code examples and allows users to interact with samples in the book.
It contains any errata or issues found after publication.
Once I set up a Plone site, I created the following basic folder and page structure:
Home
|_ Software
|_ Chapters
|_ Chapter 1
|_ Chapter 2
...
To do this, I logged in as the user who was created with the installer—in my case, the admin user. After logging in, I went to the
home page, clicked the edit tab, and wrote some text for the home page. I created links to the Chapters and Software folders.
Then I clicked the contents tab and added two folders, as shown in Figure 3-30.
[img/3294 f0330.png/image_view_fullscreen]
Figure 3-30. The folder contents with my home page and the new folders
Next, I went to the Chapters folder and started adding a folder for each chapter. Because I haven't made a default page, Plone will
Next, I went to the Chapters folder and started adding a folder for each chapter. Because I haven't made a default page, Plone will
happily create a listing of all the chapters. The description for each chapter is the name of the chapter (for example, Introducing
to Plone and This Book), and the short name is the chapter number—this will keep my URLs nice and short (for example,
/Chapters/3 ). I've left everything in the visible state, so after this, it's just a matter of adding content.
Up to table of contents [http://docs.neuroinf.de/PloneBook]
<< 2. Installing >> 4. Making Simple Customizations >> [http://docs.neuroinf.de/PloneBook/ch4.rst?image_scale=medium]
Plone << [http://docs.neuroinf.de/PloneBook/ch2.rst?image_scale=medium]