The Plone Book
The Plone Book
The Plone Book
Chapter 1: Introduction
Table of Contents
Chapter 1: Introduction.....................................................................................................................................1
What is Plone?........................................................................................................................................1
What is a Content Management System?...............................................................................................1
Why use a web based CMS?............................................................................................................1
What is the Content Managment Framework?.......................................................................................2
What is Zope?.........................................................................................................................................2
Why use Zope and Plone?.......................................................................................................................2
What is Python?......................................................................................................................................4
Who is this book aimed at?.....................................................................................................................4
What version of Plone does this cover?..................................................................................................4
Feedback.................................................................................................................................................4
i
Chapter 1: Introduction
Table of Contents
Chapter 3: Using Plone
Publishing your document..............................................................................................................25
Adding and editing other forms of content...........................................................................................26
Image..............................................................................................................................................26
File..................................................................................................................................................26
Link................................................................................................................................................26
Topic...............................................................................................................................................26
Folder..............................................................................................................................................27
News Item.......................................................................................................................................27
Discussing content................................................................................................................................27
Searching for content............................................................................................................................27
ii
Chapter 1: Introduction
Table of Contents
Chapter 6: Customizing Plone's Look and Feel
Style sheets.....................................................................................................................................45
Images............................................................................................................................................46
Plone content..................................................................................................................................46
Plone templates...............................................................................................................................46
Making a totally new skin.....................................................................................................................46
Example site..........................................................................................................................................47
Other configurations.............................................................................................................................47
Tabs................................................................................................................................................47
Dates...............................................................................................................................................48
Plone's page rendering..........................................................................................................................48
[1] ab is a benchmarking tool that comes with Apache and is a simple tool to stress test your site.
More information is available here................................................................................................................64
Packing Plone.......................................................................................................................................64
Backing up Plone..................................................................................................................................64
When to back up.............................................................................................................................64
What to back up..............................................................................................................................64
How to back up...............................................................................................................................65
iii
Chapter 1: Introduction
Table of Contents
Chapter 10: Structured Text............................................................................................................................67
My header.............................................................................................................................................68
Subheading 1..................................................................................................................................68
Appendix A: Resources....................................................................................................................................73
Websites................................................................................................................................................73
Development.........................................................................................................................................73
Learning Resources...............................................................................................................................73
iv
Chapter 1: Introduction
Table of Contents
Appendix D: About this book
Site Manager...................................................................................................................................86
Site Administrator..........................................................................................................................86
Developer.......................................................................................................................................86
Editors...................................................................................................................................................86
Andy McKay..................................................................................................................................86
Copyright and Licensing.......................................................................................................................87
Glossary of Terms.............................................................................................................................................88
v
Chapter 1: Introduction
What is Plone?
Plone is a free, open source Content Management System. The focus of Plone is to provide value at every
level of an organization. It comes with a workflow engine, pre−configured security and roles, a set of content
types and multi−lingual support. There are many developers, writers and testers from all over the world,
contributing to Plone everyday. Plone is based on the Content Management Framework.
Homepage: www.plone.org
One common dividing line between different CMS's is the integration of the web and hence can two types of
systems: a web based system, and non−web based system. Plone is a free, open source web based CMS
The easiest way to understand a CMS like Plone is to compare it with a standard web site design tool, like
Macromedia Dreamweaver. In both cases pages can be produced on a remote computer, and submitted for
approval and publication. There are, however, four key differences:
• any user with the required permission can produce web pages from anywhere, using any standard
browser, with no need for any specialist software. A CMS is easier to use than Dreamweaver and
FTP, therefore very little training is needed, and many more production tasks can be allocated to
unskilled staff. As a consequence, a CMS empowers more users to create and edit content on the
Web. Also, less training and lower skills result in lower production and maintenance costs.
• pages are produced by typing text and uploading files into the site's pre−produced templates. This
results in a more consistent corporate style. Thus, even though the number of people producing web
pages for direct publication can be large, consistency of style and, more importantly, consistency in
content structure is ensured.
• control of workflow in a CMS can be very finely grained, with the Webmaster's job being effectively
devolved to many people working in different places without any lowering of security and, more
generally, of quality standards.
• different versions of a document are automatically saved, resulting in a natural audit trail when
required.
Chapter 1: Introduction 1
Chapter 1: Introduction
These benefits of Content Management Systems are obviously more significant for large organisations, or
large collaborative projects, than for small businesses or organizations.
Homepage: cmf.zope.org
What is Zope?
Zope is a open source web application server, written in Python. It is a scalable, stable, powerful system that
includes an object database, a web server and several templating languages. Zope is developed and supported
primarily by Zope Corporation, but also by many developers worldwide.
Homepage: www.zope.org
Zope and Plone are Open Source Software (OSS), that is, the source code is available to anyone for free. The
business model of the people who produce Zope and Plone relies on earnings from consultancy services,
chiefly for customisation and enterprise use. Other examples of open source CMSes are Midgard, Bitflux,
OpenCMS, and Wyona.
Proprietary and open source CMSes are technically not very different. In both camps we find very good,
mediocre and poor products; the quality of the documentation and support also varies widely. The main
difference is that open source CMS are produced by rather smaller companies than proprietary ones. This
raises doubts on the long−term continuity of these firms, and of the support that they can provide. In my view,
however, the difference is more apparent than real. Open source producers are smaller and thus more
vulnerable to, say, the loss of one customer or the departure of a key individual; proprietary producers are
bigger, but are affected by takeovers (e.g. Allaire, by Macromedia) and the vagaries of the IT stock market
(e.g. Broadvision). All in all, BOTH kinds of producers can easily disappear. The difference is that, with an
open source product, the source code is available to the user and so is the possibility of maintenance,
customisation and development, none of which is available to users of proprietary systems without the active
intervention of the producers. This is the key reason to use an open source product.
Why Plone and Zope rather than other open source CMS? Plone is based on Zope, which is a framework for
building content management software. In a sense, Zope is an operating system for web applications, one of
which is CMF (Content Management Framework), an application to facilitate the building of CMSes. Plone is
• Zope is object−oriented, in the sense that everything appearing in a Zope web site (web pages,
images, links, files) is an object and is contained in an object database. The database is hierarchical,
not relational, and is particularly suited to hierarchical file structures. Technical people think of
databases in terms of collections of tables of rows and columns, related by primary keys. This is
different, and mirrors much more closely the structure of an ordinary file system, with objects within
objects.
• The Zope database contains all older versions of an object: this is particularly useful for undoing
changes, for the control of versions of collaborative documents, and for items requiring an audit trail.
• Zope contains a number of tools that are specially suited to large organisations and collaborative
work, and will be described later in the manual. One example: pre−defined database searches, based
on flexible search criteria, which automatically display all objects satisfying certain user−specified
conditions.
• Zope can be used an all platforms: Unix, Linux, Mac OS, and all flavours of Windows (98, 2000, XP,
NT). This is not true of most other CMS, open source and proprietary alike.
• Zope is a very friendly developing environment. The possibility of creating a customisable copy of a
script at the touch of a button, while keeping the default version in its original location, is the best
safety net I have ever come across.
• In Zope it is easy to design structured XML documents, with workflow linked to the document
structure. This is an essential feature for the administrative systems in a large organization, and
promotes both corporate consistency in the style and structure of documents and a streamlined work
flow.
• Finally, Zope was created for use by large organisations, with the following characteristics: large
number of contributors to collaborative projects, with contributors located at different sites and using
different platforms; strong organisational requirements for flexibility and security, with the need to
define local roles with different permissions to view, write, edit and approve different parts of large
projects; scalability to large numbers of objects and servers.
The seventh, cultural difference between the Zope team and their competitors is crucial for large
organisations. One of the Zope customers is the US Navy, which uses Zope for the management of
RDprojects: a big, public−sector organisation with a keen eye on flexibility and security. The same could be
said for most large corporations, public as well as private.
As far as Plone (as distinct from Zope) is concerned, I regard it as rather more than a generic CMS that
happens to be based on Zope. Plone adds to Zope at least two very useful features, which are especially
important for the purposes of the Engineering Sciences web site:
• A neat, elegant framework for navigation, relying on folders and the viewing of their content rather
than links in html documents (which would have to be updated) and aided by navigational shortcuts
such as the Bulletin (which displays objects created or modified within the last few days, thus
eliminating the need to navigate the site to find them).
• A simple tool for the creation of complex structured documents such as PIQ and UPC forms, with
different parts of each documents visible to different audiences and a customizable approval path.
The first feature makes a Plone−based site uniquely easy and fast to use; the second makes it useful for
administration, unlike most CMS which are conceived primarily for the publishing rather than the processing
of content.
What is Python?
Python is a powerful, interpreted, interactive, object−oriented programming language. Python is open source
and can run on almost any platform or system. Zope is written primarily in Python, with some optimisations
in C.
• python, (Gr. Myth. An enormous serpent that lurked in the cave of Mount Parnassus and was slain by
Apollo) 1. any of a genus of large, non−poisonous snakes of Asia, Africa and Australia that suffocate
their prey to death. 2. popularly, any large snake that crushes its prey. 3. totally awesome, bitchin'
language that will someday crush the $'s out of certain other so−called VHLL's ;−) *
Homepage: www.python.org
Feedback
If you have feedback we'd love to hear it. The best thing you could do is send us an email to the
documentation mailing list and someone will reply.
Page Editor: Andy McKay $Id: 1,v 1.4 2003/06/23 05:11:19 zopezen Exp $
What is Python? 4
Chapter 1: Introduction
♦ Installing using the Windows Installer
◊ The Installer
◊ The Plone Controller
⋅ Services
⋅ Advanced
⋅ Running Zope Manually
◊ Windows Installer Contents
♦ Installing using the Mac OSX Installer
◊ The Installer
◊ Mac OS X Installer Contents
♦ Installing on Linux
◊ Debian
◊ Red Hat/Mandrake/Suse
♦ Installing from source
◊ Requirements
◊ Getting the latest Plone
◊ Installation
♦ Adding a Plone Site
♦ Upgrading Plone on an existing installation
◊ Migrating from a pre 1.0 Alpha site
◊ Migrating from a pre 1.0 Beta3 (but later than alpha)
What is Python? 5
Chapter 2: Installing Plone
This chapter covers installing Plone so that a user can get Plone up and running. Upgrading Plone mandatory
steps at the bottom of the chapter!
Requirements
Plone will install on any of the platforms that Zope supports: Windows, Mac OSX, Linux, most Unixes and
Solaris. Windows 2000 requires writing to the registry in order to install the software, this may require more
rights than you have.
Server
A higher performance computer will obviously make Plone perform better. Plone is not a toy. It requires
horsepower and memory. In general, you shouldn't go into production with a machine slower than 1.5Ghz and
less than 1GB of RAM if you are serving a large website. It works fine with setups as low as 500MHz and
64MB of memory for more modest sites, however. For advanced information on performance see Chapter 9,
Optimizing Plone
For a base installation of Plone about 50Mb of hard drive space is required. If you already have installations
of Zope or Python, then this can be dramatically reduced. You must also account for the Plone object database
which can grow to almost any size depending upon the amount of data you store.
Client
Plone only requires a web browser that can access the server. If users want to login, cookies must be enabled.
JavaScript is not required but will provide a richer user experience.
Plone also is fully functional in the following browsers, but might look different from the original Plone look:
• AWeb
• links (text based, with optional graphics)
• Any browser that handles a basic set of HTML and form input + cookies (including most mobile/PDA
browsers)
Downloading Plone
The latest Plone is always available at http://www.plone.org/download. In the future CD's might be available.
The Installer
The Windows installer automates the installation of Plone on Windows. Windows versions 9x, ME, NT
3.51+, 2000 and XP have been tested, but it may work on others. It is recommended you have administrator
access on the computer you wish to install on. If you already have Zope or Python installed, you may want to
look at installing the source seperately to save hard drive space. The installation includes extra packages and
options, a pre−loaded database and other goodies.
The Plone installer for Windows can be downloaded from the Plone.org website, in the downloads section.
Once you have downloaded the installer, double click on the installer to begin the install. You should be
presented with the following screen:
Downloading Plone 7
Chapter 1: Introduction
The installer goes through the usual steps for installing software, follow the options at the bottom for "Next"
or "Cancel". There is no need to discuss all the steps, most are self explanatory. When you get to the "Enter a
password" screen (shown below), you must enter a password. This will register a password for the "admin"
user. You will need this password later, so make note of it. If you do lose this password you can enter a new
one through the Plone Controller.
The installation takes somewhere around 3 minutes, depending upon the speed of your computer. A few tasks
are performed at the end of the installation, such as compiling all the Python files. When the installation has
finished, Plone is not started by default. If you leave the "Launch Plone Controller" box checked the Plone
Controller will be launched which will enable you to start Plone.
Downloading Plone 8
Chapter 1: Introduction
The controller starts with the "Control" page which lets you easily start or stop your Plone instance. For the
impatient, click "Start" to start your Plone.
This screen shows you if your Plone is started or stopped, by the buttons that are highlighted and the "Current
Status" message. Since Plone does not start automatically you will have to click "Start" to start Plone. On
some slower computers it may take a while for Plone to start up, especially the first time, this causes the
Controller to time out and think Plone has not started. Clicking "Start" again will rectify this. This bug will be
fixed in later versions.
When Plone has started you can access the Plone site by clicking on the "View Plone" button. This will start
up a browser and access the Plone site for you. The "Manage Plone" button takes you to the management
interface of your Zope if you have defined a "HTTP Manage" port, by default this port is set to 8080 for you.
Services
The "Services" tab allows you to specify the ports that Plone listens to for incoming connections such as
HTTP, FTP and WebDAV. If you leave a port blank then that port will not be disabled. Ensure that no other
server is listening to the same port as Plone, things such as IIS, Apache, PWS could be listening to similar
ports.
• HTTP: specifies the port to access Plone for the user, the default is port 80. Although this port is not
required, without it you will not be able to access Plone with a web browser. If this port is enabled
and Plone is running, the "View Plone" button is enabled on the Control tab.
• HTTP Manage: specifies the port to access Plone as the manager, the default is port 8080. This port
gives you access to Zope's management interface for the root of Zope. If this port is enabled and
Plone is running, the "Manage Plone" button is enabled on the Control tab.
• FTP: specifies the port to access Plone via FTP, the default is port 21.
• WebDAV: specifies the port to access Plone via WebDAV, the default is port 8081.
Advanced
The "Advanced" windows lets you specify some of the more advanced options. If you are unsure what these
items refer to, please leave the default values alone. Of most interest is the "Service Daemon" option. This lets
you specify how Plone will be run and mostly relates to the use of services in Windows.
If you are running Windows NT, 2000 or XP you can run Plone as a service (the "Windows NT/2000"
option). This will run Plone in the background, no icon will be visible and Plone can be accessed as a service.
As a service the "Restart" button will appear in the ZMI so an authorized user can choose to restart Plone
through the web. On other advantage of running as a service is that can be started and stopped from the
Management Console (inside the Windows Control Panel) or through the command line using the net
start Plone and net stop Plone commands.
If you are running Windows 95, 98 or ME you must run Plone using the "Windows 95/98" option. This runs
Plone as a process with an icon that shows up in the system stray. You can still control Plone from the
Controller or from the system tray. Windows NT, 2000 or XP can use this option if they want.
These options are selected for you automatically during the installation.
If there are problems running Plone with the Controller, you can also start Plone from the command line.
Further details on this are available in the Zope documentation. The command that the Plone Controller calls
is as follows:
c:\Program Files\Plone\Python\python.exe
c:\Program Files\Plone\Zope\z2.py
−X −w80 −w8080 −f21
INSTANCE_HOME=c:\Program Files\Plone\Data
HTTP_MANAGE=8080
• CMF 1.3.1
♦ The CMF is required by Plone. The latest version can be found at cmf.zope.org
• Zope 2.6.1
♦ This is the latest version of Zope and can be found Zope can be found at zope.org
• Python 2.1.3
♦ Python 2.1.3 is required with Zope 2.6.0. Python can be found at www.python.org
• Python Win32 Extensions
♦ The Win32 extensions by Mark Hammond provide access to Windows API's and functions.
Win32 extensions can be found at the Starship
• PIL 1.1.3
♦ The Python Imaging Library allows you to manipulate and alter images from Python. PIL can
be found at pythonware.com − PIL is used by CMFPhoto to rescale images.
• ReportLab 1.15
♦ ReportLab provides and interface to PDF's. It allows to create PDF's from Python. ReportLab
can be found at reportlab.com
• Zope Controller 1.0
♦ The Zope Controller is a Windows GUI application to provide easy access to start, stop and
configure Zope. The Plone version is deriative of the Zope Controller
• CMF Collector 0.9b
♦ The CMF Collector is a bug tracking system for Plone. CMF Collector is developed by Zope
Corp. and can be found at cvs.zope.org
• CMF Wiki 0.1
♦ The CMF Wiki 0.1 is an implementation of the Wiki system for Plone. It is developed by
Zope Corp. and can be found at cvs.zope.org
• CMF Quick Installer
♦ The CMF Quick Installer allows you to quickly install new Zope products easily by selecting
the appropiate products in the Zope Management Interface. The Installler can be found at the
SourceForge Collective project"
• CMF Photo
♦ CMF Photo is a product that allows you to view photographs through Plone and allow them to
be dynamically resized.CMF Photo can be found at the SourceForge Collective project"
• CMF Forum
♦ CMF Forum allows you to make bulletin boards for user to add and edit comments. CMF
Forum can be found at the SourceForge Collective project"
• External Editor 0.6 (Client and Server app)
♦ External Editor is a program that allows you to edit Plone objects and content locally. It can
be found at "zope.org": http://www.zope.org/Members/Caseman/ExternalEditor
• Zope Book 2.5
♦ The original source of the Zope Book is on Zope.org and the HTML Help version is here
• Localizer
♦ Localizer allows to you translate Plone into different languages
• Translation Service and Translations
A database with an instance of Plone is installed, unless a database already exists in that directory (if so, the
database is not installed). This database contains an instance of Plone (with CMF Collector and CMF Wiki
installed), an Access Rule, a Site Root and External Editor installed.
The Installer
The Mac OS X installer automates the installation of Plone on Mac OS X. Mac OS X 10.2.3 and up have been
tested and are supported. It is recommended you have administrator access on the computer you wish to install
on. If you already have Zope or Python installed, you may want to look at installing the source seperately to
save hard drive space. The installation includes extra packages and options, a pre−loaded database and other
goodies.
The Plone installer for Mac OS X can be downloaded from the Plone.org website, in the downloads section.
Once you have downloaded the installer, double click on the installer to decompress the archive, and double
click the resulting installer package to begin the install. You should be presented with the following screen:
Enter your Mac OS X account password to authorize the installation. Your account must have Administrator
privileges to do this. If your account does not have Administrator privileges, log out and log back in as
someone who does, and then re−launch the installer. (You might want to move the installer package to
/Users/Shared before you log out so you can access it from the other account) Once the installation is
authorized, you will see the following screen:
The installer goes through the usual steps for installing software, follow the options at the bottom for
"Continue" or "Go Back". There is no need to discuss all the steps, most are self explanatory. However, when
presented with the choice of volumes to install Plone on, you must choose the partition on which Mac OS X is
installed.
The installation takes somewhere around 3 minutes, depending upon the speed of your computer. When the
installation has finished, Plone is not started by default. The ReadMe.rtf file in /Applications/Plone contains a
lot of useful information about running and managing your Plone installation, including how to start Plone.
For your convenience, the command is presented below:
• CMF 1.3.1
♦ The CMF is required by Plone. The latest version can be found at cmf.zope.org
• Zope 2.6.1
♦ This is the latest version of Zope and can be found Zope can be found at zope.org
• Python 2.1.3
♦ Python 2.1.3 is required with Zope 2.6.0. Python can be found at www.python.org
• PIL 1.1.3
♦ The Python Imaging Library allows you to manipulate and alter images from Python. PIL can
be found at pythonware.com − PIL is used by CMFPhoto to rescale images.
• ReportLab 1.15
♦ ReportLab provides and interface to PDF's. It allows to create PDF's from Python. ReportLab
can be found at reportlab.com
• CMF Collector 0.9b
♦ The CMF Collector is a bug tracking system for Plone. CMF Collector is developed by Zope
Corp. and can be found at cvs.zope.org
• CMF Wiki 0.1
♦ The CMF Wiki 0.1 is an implementation of the Wiki system for Plone. It is developed by
Zope Corp. and can be found at cvs.zope.org
• CMF Quick Installer
♦ The CMF Quick Installer allows you to quickly install new Zope products easily by selecting
the appropiate products in the Zope Management Interface. The Installler can be found at the
SourceForge Collective project"
• CMF Photo
♦ CMF Photo is a product that allows you to view photographs through Plone and allow them to
be dynamically resized.CMF Photo can be found at the SourceForge Collective project"
• CMF Forum
♦ CMF Forum allows you to make bulletin boards for user to add and edit comments. CMF
Forum can be found at the SourceForge Collective project"
• External Editor 0.6 (Client and Server app)
♦ External Editor is a program that allows you to edit Plone objects and content locally. It can
be found at "zope.org": http://www.zope.org/Members/Caseman/ExternalEditor
• Zope Book 2.5
♦ The original source of the Zope Book is on Zope.org and the HTML Help version is here
• Localizer
♦ Localizer allows to you translate Plone into different languages
• Translation Service and Translations
♦ Translation Service allows translations in Zope Page Templates and Plone. This provides the
integration between Plone and Localizer. The Translation Service can be found here
♦ There are several translations for Plone maintained at the SourceForge Plone i18n project −
the installer installs all the translation files it can, although some of the translations may not
be complete.
A database with an instance of Plone is installed, unless a database already exists in that directory (if so, the
database is not installed). This database contains an instance of Plone (with CMF Collector and CMF Wiki
installed), an Access Rule, a Site Root and External Editor installed.
Installing on Linux
Debian
Plone is a standard package in Debian sarge and sid (aka testing and unstable). Thus, Debian users can install
Plone simply using the command apt−get install plone.
Red Hat/Mandrake/Suse
RPMs are available for the Red Hat, Mandrake and Suse distributions. The latest packages can be downloaded
from SourceForge
Be aware to the dependencies of the packages. If you use them with another version of distribution it may
cause problems.
Requirements
• Zope 2.6.2 or above available from zope.org
• CMF 1.3.2 or above available from cmf.zope.org
gunzip CMFPlone1.0.tar.gz
tar −xvf CMFPlone1.0.tar
The current Plone tar ball contains several products apart from Plone: DCWorkflow and Formulator. You can
get it from Sourceforge CVS along with these other products by running the following commands [2]:
Installing on Linux 17
Chapter 1: Introduction
Installation
• Install Zope, follow the instructions contained in INSTALL.txt to complete this.
• Install CMF, follow the instructions contained in INSTALL.txt to complete this.
• Copy the CMFPlone, ActivePak, DCWorkflow and Formulator directories into the Products directory
of your Plone instance. Information can also be found in the INSTALL.txt file inside the
CMFPlone directory.
• Restart Zope. How you do this depends upon how you installed Zope and your operating system.
• Go to the management interface, this is done by appending /manage to the URL of your Zope. You
should now find "Plone Site" in the list of products to add. This means Plone has installed succesfully,
see "Adding a Plone Site for more information".
• Access the managment interface of your Zope, this is done by appending /manage to the URL of your
Zope.
• Select "Plone Site" from the drop down list:
• The following form prompts you for some information about your Plone site:
♦ Id required: is the id of the Plone site and is a short name containing a restricted character set
(just alphanumeric characters is recommended), this will be URL to your Plone site.
♦ Title: is the name of the Plone site that will appear on all pages
♦ Membership source: if you are unsure what this means, leave it at the default "Create a
new...". You either have choice of adding an user folder inside your Plone site or using one in
a higher folder.
♦ Description: a description of the site
♦ Site type: lets you define a different type of site, for example a custom site of skin. This
manual assumes you have used the Default value.
• After "Add Plone Site" has been clicked, a new site will be created. This might take a few seconds as
it loads up all the information.
If you have an existing Plone installation and wish to upgrade, then a migration tool has been added. This
migration tool requires knowledge of, and access to the Zope Management Interface. Before performing a
migration do a complete backup of your Plone site, just in case.
Installation 18
Chapter 1: Introduction
Installing the software
• Stop Plone
• Back up your Plone installation, including the database. See chapter 9 for backing up a your database.
• Download and install the new version of Plone, how you do this depends exactly on the operating
system and how you installed plone. This install will result in the files on your filesystem being
updated to the new version. Usually installing directly over the old version is enough.
• Restart Plone
• For each Plone instance in your Zope, find the tool called portal_migration in the ZMI. It will
tell you the current version of your Plone and the version on your file system. To migrate to the
existing Plone just click on migrate. Plone will perform all the necessary upgrades needed.
However since this tool was only recently added it will not be able to tell what Plone instance you have and
will display beta 1.3 for both the current instance and the file system instance. Select what you think the
correct version should be and select force migration.
[2] After using a cvs login command you will prompted for a password, just press enter (ie leave the password
blank)
Page Editor: Andy McKay $Id: 2,v 1.11 2003/09/19 22:43:28 limi Exp $
Plone makes use of current browser standards and techniques, so using a recent version of a web browser is
recommended. These instructions cover the default setup for Plone and may not be accurate for the site you
are viewing, depending upon how it has been customized.
Joining a Site
Joining a Plone site gives you the right as a Member to add content, such as images, documents and so forth.
Your exact rights depend upon how the site is configured.
To join a site, select the join link in the top right hand corner of the home page.
This opens the join form for you to complete. If this is the first Plone form you have encountered, you will
note a few things: A red square next to the label of an input field means the field is required. When you select
a field, help text will pop up to the left. You may navigate through the form fields by clicking on them.
Once you have completed this form, click register to submit your information. Then, click log in to
access the site immediately.
Logging In
If you already have a username and password, you can log in to the site by typing them into the log in box in
the lefthand column and clicking the log in link. Cookies must be enabled for you to log in to a Plone site.
Forgotten password
If you forget your password it can be sent to the email address you provided when you registered. You can
request that your password be mailed to you by clicking on the Forgot your password? link located in
the left−hand column of the website. If you did not specify a valid email address when you registered, you
will need to contact your site administrator.
Logging out
Once you are logged in to the Plone site, in the upper right hand corner you will see a link to log out. It is
good practice to log out of Plone when you are finished using it.
Member Folders
Each member has a folder where they can create and store content. They are located in the Members folder
and contain a default home page called index_html. To see your member folder, click on the my folder
link in the personal bar in the upper right hand corner of the site.
• E−Mail − This is the email address associated with your membership and is used a number of places
in a Plone site. Most importantly, if you lose or forget your password, this is the address the system
will send it to.
• 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 on
the edit tab of an object. Default: None
• Listed status − This property specifies whether your profile will show up on the Members tab and
when someone searches the members listing. Default: Listed
• Form Help − Each form field has an associated pop−up box that provides context−sensitive help.
This is very useful for newcomers to the system as they will be notified of the usage of a particular
form field when they are filling it out. Users who don't want help can turn this off by selecting no.
Default: Yes
• Display Names − Objects have a Name property that is used for the internal representation of the
content object. The Name also shows up in the object's web address (also called a 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 Name value. Default: Yes
Note: When you change an object's name value, anything that references the older name will no longer be
valid and would result in the page not being found. It is best not to change the name value after you submit an
object for review or link to it from elsewhere.
• Look − Some people like to change the look and feel of Plone and several looks or themes are
provided to allow this. Select the look you would like for your Plone site. Default: Plone Default
Forgotten password 22
Chapter 1: Introduction
• Portrait − In larger organizations and in community websites it is useful to see pictures of other
members. The portrait field allows you to upload a picture that is 75 pixels wide and 100 pixels high.
(If you upload a picture that is a different size, it will be resized to 75 x 100).
Once you have made the desired changes to your preferences, click save to commit them.
What is a Document?
A document is a page of content, usually a self−contained piece of text. Documents can be written in several
different formats, plain text, HTML or Structured Text. The default home page for a Plone site is one example
of a document.
Adding a document
To add a document, you will need to be in Contents View mode; the link is available on the left hand side
of the page. This mode shows you the list of objects in the folder and lets you edit them. If you do not see the
Switch to Contents View link, you do not have permission to add or edit content in this location.
Once you are in Contents View, you will notice a drop down box in the upper right hand corner of the center
panel next to the "add new item" button. This gives you the list of content types you can add in this folder.
Select Document from this list, then click add new item. Once a document has been added you are taken
immediately to the edit page for that document.
Editing a document
The document can be edited directly in the web browser, using the edit form. One thing to note is the
highlighted edit tab at the top of the page. Messages appear at the top of this page, as shown below.
• Name: This identifier will become part of the document's web address. It should be short, descriptive
and contain no underscores or mixed case. For example, "audit−report−2003". If you do not provide a
name, Plone will create one for you.
• Title: This item will be shown at the top of the page, in the breadcrumbs, 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 no more than 20 words − to introduce
the document and provide a teaser for the remainder of the document.
• Body Text: This field contains the body of the document. The format for the content is set using the
radio buttons below the field. They are:
• Structured Text: The default setting. Structured text is a format for taking plain text and producing
HTML without the user having to learn or type HTML. Structured Text references are available by
following these links:
♦ An Introduction to Structured Text
♦ Structured Text Help
• HTML: Any arbitrary HTML can be entered by a user.
• Plain text: Plain ordinary text with no mark up.
If you do have your document as a file on your computer you can upload this instead of typing it into the
body text field. Use the upload button at the bottom of the page. The contents of an uploaded file will replace
any content in the body field.
Once you have finished editing your document, click the save button. You will be returned to the view tab
where you can see how the document will be rendered. To edit it again, click on the edit tab.
If you don't provide correct input on the edit form, when you save the document you will be returned to the
edit page and your errors will be highlighted. At this point your changes have not been applied − you must
correct the mistakes and click save again.
Editing a document 24
Chapter 1: Introduction
• Allow discussion: This property lets this document be discussed by users who have the right to do so.
If left in default, it will use the site wide policy.
• Keywords: Keywords are a way of assigning metadata to an object. Use control+click to select
multiple keywords from the list.
• Effective Date and Expiration Date −− The effective date is the first day an object should be made
available and the expiration date is the last day. Searches and navigation only show objects within this
date range. Leaving these items blank makes an object infinitely available.
• Format: The MIME−type of the object. If you don't know what this is, just leave it.
• Language: The language in which the item is written.
• Copyright: Copyright information for the object.
• Contributors: The names of the people who contributed to the object. Each person's name should be
on its own line.
When you are satisfied with your document you will need to submit it for publishing. To do this, select the
state tab. This page gives access to the publishing process.
• Effective Date: allows you to specify a date this content is effective from. Until this date is occurs, the
content will not be published. If this date is not specified, then there will be no effect and the
document will be published.
• Expiration Date: allows you to specify a date this content will expire on. After this date the content
will no longer be published. If this date is not specified, then there will be no effect and the document
will be published.
• Comments: provides an interface to add comments to this publishing process. These comments can be
read by the person reviewing your content in the publishing process. Similarly if the reviewer rejects
your content, they will be able to put comments here so that you will know why your content has been
rejected.
• Change state: these are the states that the document can be saved to. Publishing and reviewing content
is covered in more detail in Chapter 4 of this book, but for the moment you will want to publish your
content, so select Submit and then click save.
Your document will now be in the pending state. A reviewer will review your content and decide whether
to publish it as−is, edit it and publish it, or reject it.
Image
Images are graphical pieces of content. This content type usually ends with an extension such as: gif, jpg, png,
tif or pict. Images can be displayed inside of the Plone CMS without having to download them to the local
computer if the image type (extension) is viewable in the user's web browser.
When you add an image, the id of the object is changed to be the file of the image. So if you upload an image
called photo.gif, it will be accessible in Plone as photo.gif. When adding or uploading a new image you can
select the image from your file system by using the browse button and selecting the file.
It is noteworthy that Macintosh .pict files are often not viewable by Microsoft browser platforms.
File
A file is any arbitrary object that can be uploaded from your file system. This could be any sort of item such
as a plain text file, a Microsoft Word Document, an Excel Spreadsheet, a PowerPoint Presentation, an Acrobat
PDF and so on. When you add a file, the id of the file is changed to be the name of the file. So if you upload a
file called book.pdf, it will be accessible in Plone as book.pdf.
Link
Link objects are the primary way for users to share URL's. These URL's can be internet resources or local
resources. Links can contain metadata like any other content object. Please note that if you are going to link to
a internet resource you should preface your link with the suitable protocol (e.g. http://), otherwise your link
will possibly be incorrect.
Topic
Topics enable users to create collections of resources by querying the central information repository. The
collection is defined on the criteria tab. The criteria specified will match all content objects that are cataloged
by the system. You can query a number of different aspects of the system: by physical location, time created,
review_state, and many other facets. Topics only link to other resources; they do not keep physical resources
inside them like normal Folders.
By default only users with the Manager role are allowed to create topics.
Folder
Containers are the simplest and most powerful mechanism for organizing content. A Folder is a container that
can house any sort of content object, such as Files, Documents, or any other content type. By default all
content types can be added to a Folder.
News Item
News Items are commonly used in websites. Published News Items show up in reverse chronological order on
the News tab and in the News section.
Discussing content
Any piece of content in Plone can be discussed. The owner of the content (otherwise known as the person who
created it) turns on the discussion feature by clicking on the Properties tab of the object and checking
Allow. The default radio button is the policy for the content object that has been set by the Site
Administrator.
If discussion is enabled, when viewing content the discussion will be shown and users will be allowed to
participate.
In the Advanced search form you are able to query content by a number of attributes including: title,
keywords, description, review state, creation date, content type and even author.
In this chapter we have covered some of the basic elements such as adding and publishing content, searching
and altering your Plone instance to suit your needs. Although each Plone site is different, each will have these
basic elements.
Folder 27
Chapter 1: Introduction
♦ Reviewing objects
♦ Editing an object after it has been published
Folder 28
Chapter 4: The Workflow System
Workflow is the process used to manage objects in a website. An example is a company's press release: an
employee writes a press release and submits it to an editor for review before it is published on the website.
This review process is called a workflow and is used by site managers to ensure that site content is correct.
Plone has a very powerful and flexible default workflow system that is built around Object States and
User Roles.
Object States
An object's state determines whether it is available to the various types of users defined in Plone, and what
other states that object can be transitioned to. Plone's default workflow includes four states: visible, pending,
published and private. Site managers and developers can create custom states − these are explained in more
detail in Chapter 5.
• By default, objects are created in the visible state. All users can find visible objects through the
search function and can access them directly by visiting the object url. Visible objects do not show up
in the navigation tree. Visible objects within private folders are still visible to all users and available
through the search function. Visible objects are editable by their owners and site managers.
• Pending objects have been submitted for publishing by site members. From an end−user standpoint,
they behave like objects in the visible state. The difference between the two types is that pending
objects are flagged for review; site reviewers are prompted to publish or reject pending objects.
Pending objects are editable only by managers.
• Published items are visible to all site visitors. They appear in search results and the navigation
tree. When a News Item becomes published it becomes visible under the News tab and also in the
News box (see Chapter 5). Published items are editable only by managers, but can be retracted by
owners for editing (retracting reverts an object to the visible state).
• Objects 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 will not appear in search results or on the navigation
tree for other users. Private items are editable by managers.
Note: Although most objects have their own states, some inherit their states from their parent objects. Forums
are an example of this behavior. Forums within visible or published folders are available to all users through
the search function. Forums within private folders are only available to users with access to that private folder.
User Roles
Plone uses roles to define what different users can see and do. In this way, Plone builds security into every
aspect of its operation. The roles defined in a default Plone installation include anonymous, member, owner,
reviewer and manger.
• Anyone who visits the site and does not log in takes on the anonymous role. In public sites,
anonymous users can see published, pending and visible content by directly visiting a url or by
searching, however only published content is visible on the site navigation tree. If you have set your
site up as private, anonymous users cannot see anything.
• Members are users who have logged in to the site. Members have the added ability to create content
in their own folder, which is then submitted to site reviewers to be published. In public sites, members
Plone inherits the role model from Zope itself. Please refer to the Zope Book for further information.
To change an object's state in contents view, check the box next to the name of the object to be changed and
then click the change status button at the bottom of the page. Scroll to the bottom of the Publishing Process
page and choose the desired state, then click submit.
One can also change states in item view. Simply click on the state tab, scroll to the bottom of the page, choose
the desired state and click submit.
Local Roles
Site managers can give specific users additional rights in certain sections of the website. This can be
accomplished by assigning local roles to folders. Managers and owners have permission to assign local roles.
To assign a local role, switch to contents view of a given folder and click Local Roles on the content tab.
Search for the name of the user to whom you wish to assign a role, and check the box above their name. The
choose the role to assign from the drop−down list and click "assign local roles to selected users".
Publishing an object
Object owners can alter and edit objects in the visible state. Once an owner finishes editing an object, it
can be published by clicking the State tab. This opens a publishing form:
Reviewing objects
If you have reviewing privileges, when you log in to your Plone web site, you will be presented with an
indication if any objects are awaiting review. This is shown in the personal bar as shown here:
Select this link to get a list of the objects ready for review, then select each object to review it. Click on the
publishing tab and you will be presented with a form like the one above. At this point you have basically two
choices − either approve an object and publish it (the publish option) or reject it (the reject option). If you
reject the object you will probably want to provide a comment to the user explaining why you have rejected it.
Previous [Chapter 4: Workflow] | Contents | Next [Chapter 6: Changing the look and feel]
Reviewing objects 32
Chapter 1: Introduction
⋅ Review Slot
⋅ Writing your own Slot
◊ Navigation and Forms
◊ Syndication
Reviewing objects 33
Chapter 5: Configuring Plone
This chapter shows you some of the configurations that you can make to Plone through the web
interface, without writing any code.
Accessing is as simple as adding /manage on to the end of your URL, for example:
http://localhost/manage. If you are using the Mac or Windows installer you can access the site using
port 80 and the root ZMI through port 8080. For example Plone will be accessed via http://localhost
and the ZMI via http://localhost:8080/manage.
Navigation is given in the left hand frame and objects are managed in the right. For more information
on the ZMI please see the Zope Book Chapter X.
Note: if you log in to the root of the ZMI this will log you in via HTTP Basic Authentication which
has no method of logging you out. This means you will be unable to log out of your Plone site,
without closing your browser. This is not a bug in Plone, but rather a lacking in the HTTP Basic
Authentication API. For testing it's usually easier to have two browsers open, one logged in to each.
...
Actions
In Plone there are certain things that can be performed at different times by different people in
different parts of the site. Things like search, browse the folder, log in and so on, these are called
Actions. Plone translates them into tabs, links and other elements. They are a highly configurable way
of provide navigational elements for a site. Actions are edited through the Zope Managment Interface
(ZMI) and are contained in a few places, such as portal_actions. Tools that have actions are are
called tool providers.
Actions in general
Each action has the following properties that can be figured in the ZMI:
♦ Name −− a nice name for the action, this name is often used in UI, for example when the
action is used as a tab, this is the text in the tab.
♦ Id −− a unique id (to this current tool provider) for the action
♦ Actions −− the action that is to be performed. For example when the action is used as a tab,
this action is used as the link. This field is a tal expression, see the ZPT documentation for
more information.
♦ Condition −− a condition that has to occur in order for the action to be used. For example
when used as tab, if this condition is met the tab will appear. This field is a tal expression, see
the ZPT documentation for more information.
♦ Permission −− the permission the user has to have in order to have this action. This
permission has to be met in order for the action to be used.
♦ Category −− is used to categorise the actions. In Plone this used to distinguish the actions so
they are used in different sections of the UI. The following categories are used:
◊ folder −− actions in this category appear on folders.
◊ object −− actions in this category appear on objects.
◊ portal_tabs −− these actions appear at the very top of the Plone site the default ones
are "Welcome", "Members", "News", "Search" and so on. Actions in this category are
normally related to the entire portal, as opposed to particular content.
◊ object_tabs −− these actions appear in the middle of the page at the top of the content.
These actions are usually related to the content, in many cases they do not show up
unless the current user has the right to edit the content.
◊ folder_buttons −− are the buttons that appear on the folder contents page and relate to
copying or moving content in a folder, such as copy and paste.
◊ user −− are actions that relate to a user, such as "Log in" and "Join"
♦ Visible −− if the category is active or not. Since actions usually relate to visual elements,
the term visible is used.
In Plone, the order of the actions in each category as presented in the ZMI determines where it
appears in the skin. For example "Welcome" is the top most action and appears at the far left of the
portal tabs at the top of the Plone site. Select the action and use the Move up and Move down
buttons to move the actions up or down the list.
Action Providers
The action providers are a little spread out unfortunately and it sometimes can be a little hard to find
where the action appears. To get a list of the current action providers in your Plone site, in the ZMI go
to portal_actions and select Action Providers. This list all the objects that are able to
have actions.
Portal actions is the generic hold all for all actions that are not in other providers. The most commonly
used actions contained here are the actions in the portal_tabs category.
Actions in general 35
Chapter 1: Introduction
Contains the actions for a user that relate to being a member. These are usually all of the user
category. These actions appear under the portal tabs in the standard Plone skin. Most of these actions
have permissions relating to the user being logged in or not.
Contains actions for registering a user. In the default Plone there is only one action join.
Contains actions for discussions. In the default Plone there is only one action reply
Contains actions for undoing content, such as undo and quick undo. These provide the interface
for users to undo content so that they can revert to previous versions of content.
Contains actions for syndication content. If you wish to syndicate content you must make this action
Visible. Then a "Syndication" tab will appear on folders and give the user option to syndicate the
content.
Actions here are contained in the workflow and as such are a key part of the workflow. Workflow is
discussed in chapter XXX.
Contains an action for modifying the portal, such as Plone setup which allows you to modify
some of the key plone parameters.
Slots
A slot is a little section of a web page that has a self−contained piece of information. In Plone these
slots are found on the left and right columns of the page and contain information such as the calendar,
navigation, login box and so on. These slots can present dynamic or static information to the user and
can be easily configured through the ZMI.
Action Providers 36
Chapter 1: Introduction
To configure the slots you need to access the ZMI and select the "Properties" tab on the object you
want to edit. In Plone's case this means selecting your Plone instance, then "Properties". This shows a
list of properties including left_slots and right_slots as shown below:
The left_slots refer to slots shown on the left of the page, the right_slots lists the slots
shown on the right of the page, in the order they are given. The slots properties can be edited here and
they will affect the whole site, or you can edit the properties on each folder to affect pages below it,
for example in the standard Plone install you will notice that the Members folder has a different
right_slots property.
Not all of the slots available are configured in Plone. Following are details of each slot in Plone, its
file location and the path expression that needs to be added in to the slots so that it will show up.
About Slot
Filename: plone_templates\ui_slots\about_slot.pt
This shows information about the current object, such as who created it, when it was last updated and
so on.
Calendar Slot
Filename: plone_templates\ui_slots\calendar_slot.pt
About Slot 37
Chapter 1: Introduction
Path Expression: here/calendar_slot/macros/calendarBox
This displays the Plone calendar. This can be configured using the portal_calendar tool in the ZMI
and shows the selected object types on the calendar.
Events Slot
Filename: plone_templates\ui_slots\events_slot.pt
Displays a list of the upcoming events. Even if you have this item in the slot list it will not show
unless there are some published events.
Favorites Slot
Filename: plone_templates\ui_slots\favorite_slot.pt
Displays a list of the users favorites and a link to organize them. Even if you have this item in the slot
list it will not show unless the user has some favorites.
Login Slot
Filename: plone_templates\ui_slots\login_slot.pt
Events Slot 38
Chapter 1: Introduction
Displays the login box so user can login. Even if you have this item in the slot list it will not show if
you are logged in.
Navigation Slot
Filename: plone_templates\ui_slots\navigation_tree_slot.pt
The navigation slot shows a simple tree of the folders in the current position in the form of a tree. It
provides a very powerful and simple navigation tool. The navigation slot is extremely customizable
and can be altered by accessing portal_properties/navtree_properties inside the ZMI.
News Slot
Filename: plone_templates\ui_slots\news_slot.pt
Navigation Slot 39
Chapter 1: Introduction
Shows a list of all the recent news items, with links to them. Even if you have this item in the slot list
it will not show unless some news is published.
Related Slot
Filename: plone_templates\ui_slots\related_slot.pt
Shows a list of all the related items, as determined by the keywords. For example in the above image,
the current page has the keyword Python and all other pages with that keyword are shown. Items are
seperated into internal and external resources. Even if you have this item in the slot list it will not
show unless there is some related objects.
Review Slot
Filename: plone_templates\ui_slots\review_slot.pt
Related Slot 40
Chapter 1: Introduction
Displays a list of objects that are in review status and are awaiting to be reviewed. This is only shown
if the user has review status and there are items awaiting review. The number of items is also shown
in the navigation bar as seen below.
If you wanted to just write your own custom slot, you would most likely add a Page Template with
the correct HTML and TAL classes for more information please see: ...
Syndication
Syndication is the ability to access a folder's contents through RSS (Really Simple Syndication or
Rich Site Summary). RSS produces a list of all the objects in the folder. This summary can then be
accessed programatically through many different news reading programs.
To enable syndication in the ZMI go to the portal_syndication object. There is one action for folders
called "Syndication", this is not visible by default. Check the "Visible" check box to ensure the action
is visible. Syndication for the site will also need to be enabled, click on the "properties" tab and click
"enable syndication".
Any folder in your Plone site will then have a Syndication tab. You have to enable syndication for
every folder you wish to have syndication for. Go to the folder you wish to enable this for and click
the "syndication" tab. There is a simple button to enable syndication click this to enable syndication,
if you get the message "Syndication not allowed" return to the portal_syndication object and ensure
you enabled syndication in the properties tab.
Update period
how regularly the client should come and check that the RSS feed is up to date.
Update frequency
...
Update base
...
Maximum Items
the maximum items to display
Note: syndication does not recurse through every folder below, it is for the current folder and its
published contents only.
Page Editor: Andy McKay $Id: 5,v 1.5 2003/07/03 18:10:41 zopezen Exp $
Previous [Chapter 4: Workflow] | Contents | Next [Chapter 6: Changing the look and feel]
Previous [Chapter 5: Configuring Plone] | Contents | Next [Chapter 7: Plone Style Guide]
Skins
A skin is a visual wrapper around content. It may contain small portions of logic directly releated to that
visual representation as well. When you install Plone you will see the default skin, this is the one most users
are familiar with and the default one you will see at plone.org and other sites. By writing a new skin you can
change the way Plone looks, although it will still have that similar Plone feel − zopezen.org or zopera.org for
example.
But Plone doesn't have to look at all like or be even vaguely recognisable, as a Plone site, if you put a totally
custom site. Take, for example, the list of sites found here − all of them provide a totally different and custom
experience for the user. In most cases the sites can easily flip between skins providing different skins for
users. Many site use the power and flexibility of the Plone interface internally so users can add and edit
content easily, whilst providing a totally different external view.
Skins are defined in the ZMI in portal_skins tool. When in portal_skins click on properties. This
will present a list of the skins available on this site. For example there is a skin called "Plone Default". In the
form you will see an entry for this skin and some values next to it, these are layers.
In the properties tab a user can alter the default skin to be shown to users and or allow users to change
their skin. If users are allowed to change their skins, they can go to the my preferences screen and
change it there.
Layers
Each skin contains layers. A layer is an individual set of templates and scripts that get presented to the
user, by combining these layers a skin is formed. This allows a user to easily add or remove components to a
skin by altering these layers. Again for example in the "Plone Default" skin (accessed through the ZMI by
going to portal_skins −> properties), has a series of layers, "custom, ..." and so on. These are the layers for
this skin.
• the order of layers is important, the top most layers will be examined first for an object
• each layer is an entry in portal_skins −> contents, and is usually a Filesystem Directory View or a
Folder
Thats it, return to your Plone interface, the image has changed. Simple.
So first let's look at the layers for the "Plone Default" skin. The first layer is "custom", this is the custom
folder found at portal_skins −> custom. Somwhere down the list you will find the plone_images layer.
This maps to a Filesystem Directory View and these files can be found on the file system inside your Plone
installation. When you click on the image (portal_skins −> ploneimages, you are presented with no option to
edit the image, but you can customise it, the text on the screen shot below helps explain it.
You cannot edit this image, because it exists on the file system. You are given the default folder custom in
the drop down list. Clicking customise makes a copy of the image inside the custom folder inside the
ZODB and takes you directly to it. If you look carefully you will see the path to the image has changed, the
meta type has changed and now you can edit the image.
Why is this done, because in our list of layers, the custom layer comes before the plone_images layer, since
this image has been copied into the custom folder this image is now the first image looked up. So when the
browser requests logo.jpg, it will look through each layer, finding the image in custom first, it will return
that image.
So far, so good. Now in step 4 above we uploaded a new image. This altered logo.jpg and since that image
will be found in the list first.
This is the basic concept of skins and layers in Plone. By altering the layers and moving individual elements
between layers you can easily alter and customise your site. It allows you to customise as little or as much of
your site as you want.
Style sheets
Most of Plone's style is controlled from stylesheets and by configuring these stylesheets you are able to
radically alter Plone. There are four stylesheets found in portal_skins −> plone_styles:
• ploneCustom.css: is a the custom stylesheet that is actually blank. You should customise this
stylesheet first. Note: This sheet added in Plone 1.1.
• plone.css: is the main stylesheet that controls most of the setup for the site, if possible alter
ploneCustom.css first.
• ploneNS4.css: is the stylesheet for Netscape 4
• plonePresentation.css: contains code for Opera's presentation mode
• plonePrint.css: contains code for printing pages
The other folders in portal_skins −> plone_styles are the skins that come with Plone and provide good
examples of different sites.
Images
All images (except specific products) are contained in plone_images.
Plone content
Contains the templates relating to content. These are all Page Templates, which is Zope templating languages,
used mostly for HTML and used almost exclusively for Plone. Page Templates are an extremely powerful and
elegant templating language[1]. By altering any of these templates you can alter how content is represented.
Plone templates
This contains probably the most important part of the site, the main templates, the standard header and footer
and so on.
Really the main trick to customising a new site is finding the parts you need to customise. This is actually
easy to do. First find the URL of the page you are calling, if there is a last element such as login_form or
document_edit, then these will directly relate to objects in the portal_skins directory. To find the actual
object go to portal_skins −> find and enter the last element of the URL. For more complicated elements you
might need to examine the portal_types tool to see what action is being called. If all else fails, use find or grep
to find the files on the file system.
• go to portal_skins and add a folder, give that folder a name such as alpha
• then go to portal_skins −> properties and add a skin, to do this enter the name and then the list of
layers, just enter alpha
For a new skin you may or not want to add in previous Plone and CMF elements, this is up to you, if you do
add them in after the new alpha layer. That's it, you now have a new skin called alpha that picks items up
primarily from alpha.
Images 46
Chapter 1: Introduction
Example site
One example site that uses Plone is ZopeZen.org and all the code for ZopeZen's skin is available. Futhermore
a set of three articles discuss how this skin was made. Although with new Plone releases this has unforunately
become a little outdated in parts, most of it is still revelant.
Other configurations
Tabs
Tabs are determined by "Actions" and "Action Providers", covered in Chapter 5 of the Plone book. Tabs are
generated by creating action entries. The category field affects the tabs in the following way:
• if the category is portal_tabs it will show up in the top of the site (for example: News)
• if the category is object_tabs it will show up in the green editable border (for example: Edit)
• if the category is folder_buttons it will show up as a button in the folder_contents (for example:
Folder Contents)
One common task is to add a tab to the top of portal pointing to a folder of content. For example on Plone.org
all the documentation is in a folder called documentation. Since we want users to be able to easily access
the documentation an action was added.
Example site 47
Chapter 1: Introduction
Dates
Plone presents dates in a certain format for easy reading. Those formats can be altered from the Zope
Management Interface. There values are stored as properties on the Plone site. In the ZMI got to
portal_properties −> site properties.
Both these values use Python's time format module to produce a time format. The reference for the formats
can be found here − If you are unfamiliar with this module, here is a quick summary.
For example the default setting for localTimeFormat is %b. %d, %y. This formats the date so that is in the
format abbreviated month. day number, year in two digits, for example: Oct. 24,
02. If we want to included the day name, this would be a simple matter of changing localTimeFormat to read
%A, %b. %d, %y. This would produce the following: Thursday, Oct. 24, 02.
This covers how a Plone page is rendered so you can alter or edit this rendering to suit your own site.
Presentation of content in Plone is via a page template called main_template.pt, that can be found on
the file system in skins\plone_templates and in through the ZMI for customization at portal_skins −>
plone_templates −> main_template.
[1] Page Templates are explained in the Zope Book see Chapter 6 and Chapter 13 for more information.
Previous [Chapter 5: Configuring Plone] | Contents | Next [Chapter 7: Plone Style Guide]
Dates 48
Chapter 1: Introduction
Previous [Chapter 6: Changing the look and feel] | Contents | Next [Chapter 8: Extending Plone]
Dates 49
Chapter 7: Style Guide
This chapter covers the extending Plone, by altering or adding to the code and HTML so it can be customised
for your needs.
Plone HTML
Credits: Laura Trippi
Plone Colours
Credits: Laura Trippi
Temporarily discontinued
Plone Stylesheet
Credits: Laura Trippi
Previous [Chapter 6: Changing the look and feel] | Contents | Next [Chapter 8: Extending Plone]
Previous [Chapter 7: Plone Style Guide] | Contents | Next [Chapter 9: Optimizing Plone]
Adding your own types may require a little knowledge of python. There are several ways to create plone
extensions:
Note: Some of this can also be done using ZClasses. We do not recommend or cover the use of ZClasses for
this. There is an excellent How To on creating content types using ZClasss here:
This is easier to follow with an example. Most companies issue Press Releases which are announcements of
company news such as new products or deals. For this a News Item often suffices, but lets assume that we
want to have some different things happen to these Press Releases:
In the ZMI access portal_types. The portal_types tool lists all the content types registered with your site.
This will include all the standard ones, Documents, Folders and of course News Items. − Using the Add menu
in the top right, select Factory−based Type Information
• Enter an id of Press Release and in the Use default type information select CMF
Default: News Item. Then press Add to complete this form.
Each content type in Plone has information about describing the content type, these are listed in the menu.
Selecting the News Item means that the Press Release will have the same initial properties and configuration
as the News Item.
In the portal_types list you will now see that a new content type has been created called Press Release.
You will also note that if you access Plone as a normal user, they will now be able to add Press Release
object.
At the moment the Press Release object is not very impressive, it will be exactly the same as a News Release,
albeit with a different name. In the portal_types tool select the newly created Press Release object. This will
bring up this type's properties, which will notice are the ones from the News Item. For example, the
description reads "News Items contain ...". This is the description that appears for a Press Release and it
should be changed to something more suitable, for example: "Press Releases contain news for the public".
To complete the second of our goals we will need to alter the templates for this content type to present a
different view to the user. In the portal_types tool select Press Releases and then the Actions tab. This
presents the list of actions for each content type, you will probably recognise these actions as the same tabs
that appear across the top of the page for the content.
In our case the action we want to change is the View action. This action is the default page that the user gets
when they access this content. Each action points to a Page Template that is called when the action is called.
Because we based this content type on a News Item the action of the view will point at the
newsitem_view. Searching through the plone skins you will find that newsitem_view actually relates to
the object portal_skins/plone_content/newsitem_view.
All we have to do now is alter the view so that we have our companies blurb at the bottom. This is a simple
matter of altering pressrelease_view so that the required HTML is added to the page. For example
after:
<h3>About My Company</h3>
<p>Blah....</p>
This now enables us to complete the requirement of showing some extra content at the bottom of each page.
Overview
Repurposing content is a simple way of altering content in your Plone so that simple changes can be made to
content. Whilst it allows simple changes to be made, it doesn't allow complicated changes beyond the scope of
the original content type.
However because this subject is so deep, we cannot cover it all here, instead we will make some assumptions.
...
Using Archetypes
Archetypes is a framework for the development of new Content Types in Zope/CMF/Plone. Schema driven
Archetypes (formerly known as CMFTypes) is a Zope Product which simplifies the creation of new content
types under Zope 2 and the Content Management Framework (CMF). A content type might be a document,
event, image, or any other content object that is made available for users/content creators to add to a Zope
content management site. Most content management projects involve introducing new types of content, which
can be both time consuming and complicated. Archetypes provides a simple, extensible framework that can
ease both the development and maintenance costs of CMF content types while reducing the learning curve for
the simpler cases.
The creation of a new Type using Archetypes involves a main text file (python) that defines the fields and
other objects within your type, their properties, and their behavior. Archetypes uses this information to auto
generate on demand all forms and pages needed to add, edit, and view your types data. When you have written
this file, you then have a product that you would install just like any other CMF/Plone product.
More about Archetypes, it's Developers Guide and other helpful information is located at
http://plone.org/documentation/archetypes/
Plone has a form and navigation system to help make creating and navigation forms easier.
Portal form
The portal_form tool provides validation and navigation services for forms. The easiest way to describe
this is to see how portal_form works, for example the process of editing a Link object.
The URL for editing a link is ../myLink/portal_form/link_edit_form. The HTML action of the
editing form is itself, ../myLink/portal_form/link_edit_form. The 'portal_form tool intercepts
the url's traversal and checks for newly submitted values. If the portal form tool sees new values, portal_form
finds a set of validators for the form in the portal_properties/form_properties sheet and
invokes them on the submitted values. The chain of validators returns either success or failure.
Portal_form looks in portal_properties/navigation_properties to see what should happen
next, and it hands off to the appropriate destination. Because portal_form handles the invocation of the
validation and the navigation, all your form processing code has to do is to update your object. The end result:
simple, modular validators and simple form processing code, all of which can be reconfigured using the
property sheets in portal_properties.
Here's what you need to do to make portal_form work for your forms:
• In your form: Change the action of your form so that it submits to itself (set the action to request/URL
−− see link_edit_form). Add a hidden variable called form_submitted and set its value to
template/id. Portal_form tests REQUEST.form_submitted to determine whether a form has been
submitted or not.
Portal navigation
The portal_navigation tool is part of a controller for handling navigationin forms. Navigation is completely
configurable through the navigation_properties sheet in portal_properties. The format of a navigation property
is as follows:
For example, the navigation for editing a link looks like so:
link.link_edit_form.failure = link_edit_form<br/>
link.link_edit_form.success = script:link_edit<br/>
link.link_edit.success = action:view
The navigation tool implments the state controller pattern from Design Patterns, and the navigation_properties
sheet is a state transition table. The left hand side of the navigation properties above indicates the current state,
and the right hand side indicates the transition.
For example:
link.link_edit_form.failure = link_edit_form
Portal navigation 55
Chapter 1: Introduction
means that after receiving an outcome of failure from validating link_edit_form on a link, the navigation
tool should re−invoke the page template link_edit_form on the current context. And:
link.link_edit_form.success = script:link_edit</code></p>
means after receiving an outcome of success from validating link_edit_form on a link, invoke the script
link_edit on the current context. And:
link.link_edit.success = action:view</code></p>
means after receiving an outcome of success from invoking link_edit on a link, perform the view action on
the current link.
The transitions specified on the right hand side can be the following:
PAGE_TEMPLATE
invoke the page template PAGE_TEMPLATE on the current context
action:ACTION
invoke the action ACTION on the current context
script:SCRIPT
invoke the script SCRIPT on the current context
url:URL
redirect to the specified (absolute) URL
In addition, the transitions can incorporate data from the request via brackets. For example,
url:http://www.zope.org/?myId=[id] will send the user to the specified URL with [id] replaced
by the value of REQUEST.id.
• In the ZMI (/manage) select the cookie_authentication object and erase the value for Auto−login
page ID which is probably set to login_form.
• Install the VerboseSecurity product
• Set the environment variable, ZOPE_SECURITY_POLICY to PYTHON (For more information on
environment variables to make Zope behave differently look at the file doc/environment.txt
inside the Zope source)
• Restart your Zope
• When a security error is raised, VerboseSecurity should give you some more helpful information.
• This is very helpful for debugging, but please note this is a performance hit, so should only be run on
development sites
Editor: Andy McKay $Id: 8,v 1.4 2003/10/09 11:22:29 yenzenz Exp $
Previous [Chapter 7: Plone Style Guide] | Contents | Next [Chapter 9: Optimizing Plone]
Previous [Chapter 8: Extending Plone] | Contents | Next [Chapter 10: Structured Text]
Debug mode
Although this may sound obvious, running Plone in debug mode is a huge performance hit especially
on Windows. When accessing a page in Plone, if you are running in debug mode Plone will check
every single image, script and template in the skins directory to see if it has altered. Whilst affects all
operating systems it is particularly bad on and Windows this can make pages 5 to 10 times slower.
When Zope is running in debug mode, the Refresh product will also check each product to see if the
code has changed. Again this is a performance hit. For more information on Refresh please see the
Zope documentation.
Debug mode is enabled or disabled by a command line switch −D at start up. By default the installers
do not run in debug mode. For more information see Chapter 3 of the Zope Book
Simple optimizations)
Credit: Shane Hathaway and Sidnei de Silva
Starting python with the −O option does a tad bit of optimization. There is roughly a 5−8% speed
increase by optimizing generated bytecode.
Starting your Zope using −t (number of threads to use) will give some increase of performance on
very high traffic sites. But memory consumption will also increase. It appears 3 threads is enough for
large sites, remember Zope is multithreaded but most of the I/O bound processing does not block
threads. Zope is also a asyncronous application like Squid.
Monitor your cache size settings (see below). If you are seeing excessive amounts of object loads
increase your cache size. Use the activity graph to gauge ZODB activity. typically over 1 hour you
dont want more than a thousand or so loads continuelly. i.e. on plone.org sometimes we get 5000
loads ... but this is rare.. over a 30 minute period we usually get only 10−100 object loads.
The number of bytecodes processed until the interpreter switches can be edited in syscheckinterval.
This system attribute is set in $ZOPE/z2.py to 500 (in recent versions of Zope) but I have a sneaking
suspecion that Plone and ZPT are executing much more processing than the average Zope. This is
currently at 750 on Plone.org.
./configure \
"−−prefix=/usr/local/apache" \
"−−with−layout=Apache" \
"−−enable−module=so" \
"−−enable−module=proxy"
# http://www.remotecommunications.com/apache/mod_gzip/::
# MOD_GZIP configuration (after loadmodule−part of httpd.conf)
mod_gzip_on Yes
mod_gzip_minimum_file_size 1002
mod_gzip_maximum_file_size 0
mod_gzip_maximum_inmem_size 60000
mod_gzip_item_include mime "application/x−httpd−php"
mod_gzip_item_include mime text/*
mod_gzip_item_include mime "httpd/unix−directory"
mod_gzip_dechunk Yes
mod_gzip_temp_dir "/tmp"
mod_gzip_keep_workfiles No
mod_gzip_item_include file "\.php3$"
mod_gzip_item_include file "\.txt$"
mod_gzip_item_include file "\.html$"
mod_gzip_item_exclude file "\.css$"
mod_gzip_item_exclude file "\.js$"
<VirtualHost *>
# Virtual Host Monster handling
ServerName plone.org
ServerAlias www.plone.org
ServerAdmin webmaster@plone.org
ProxyPass / http://localhost:8080/VirtualHostBase/http/plone.org:80/plone.org/V
ProxyPassReverse / http://localhost:8080/VirtualHostBase/http/plone.org:80/plon
#
# gzip handler
#
mod_gzip_item_include handler proxy−server
mod_gzip_on Yes
CacheRoot "/tmp/proxy/plone.org"
CacheSize 5000
CacheGcInterval 2
CacheMaxExpire 24
CacheLastModifiedFactor 0.1
CacheDefaultExpire 1
It was found that Zope's default database cache size is set very low, and Plone benefits hugely from
increasing the number of objects cached. So try the following completely painless optimization. Do
the following:
Caching slots
Credit: Alan Runyan
Recently some tweaks to RAM Cache Manager on plone.org and people who have good connections
said the speed−up was significant. This is a good overview of the ideas behind caching in
Zope/CMF/Plone, caveats and how we did it on plone.org to increase performance significantly.
Plone has "slots" which you can put path expressions to macros in. In the same order of these slots,
the expressions are evaluated and the resulting HTML is put on the page. left_slots puts content
in the left column and right_slots puts content in the right column. Very simple. A path
expression looks something like: here/calendar_slot/macros/calendarBox (this is in
the default Plone setup right_slots). Rendered in a PageTemplate like
python:path(here/calendar_slot/macros/calendarBox) would return the calendar
widget. You can find more about path expressions using the Zope 2.6 book.
In the ZMI if you drop down the items to add box you will see near the RAM Cache
Manager. The RAM Cache Manager is a default Zope tool and more information can be found in the
Zope Book − putting one of these into your root folder will enable templates to register with it so
there content is cached. You can have different REQUEST variables as keys into the cached content.
So for instance on plone.org we created a cache_calendar RAM Cache Manager and its REQUEST
variables are:
♦ month
♦ year
♦ HTTP_ACCEPT_LANGUAGE
So each time the calendar_slot is rendered it checks the REQUEST for these variables and matches
them to the output of the expression. This allows us to have the calendar cached in multiple langauges
and with different year/month settings.
This is quite nice.. right? The cache manager keeps the baked HTML and when your object/template
changes it invalidates the cache (or you can manually/programmatically invalidate it). But there are
some problems. Things could never be this easy, right?
Secondly here/calendar_slot caches the template in the context of the object, this is where
Acquisition will bite you. If you render the path expression here/calendar_slot in plone.org you get
the calendar_slot rendered in the context of /, but if you are looking at say
http://plone.org/Members/runyaga/ then you will get the calendar_slot rendered in the content of
/Members/runyaga which is a different entry.
The navtree:
− cache_navtree
− AUTHENTICATED_USER
− HTTP_ACCEPT_LANGUAGE
− URL1
If you cache here/navigation_tree_slot you should only get entries by URL1 in the currently
SELECTED Language of the Logged in User. Anonymous is the user for people not logged in.
− cache_news
− HTTP_ACCEPT_LANGUAGE
We only need to cache the portal/news_slot by languages just so that the i18n labels are cached.
Caching Pages
♦ HTTP Accelerated Cache Manager works by adding HTTP Cache headers to objects.
♦ RAM Cache Manager caches objects in RAM for fast retrieval.
Both these caches are discussed further in the Zope Book section on caching
While setting up a client machine running Windows NT, I noticed a large number of 404 errors in the
log. It turns out the client machine was getting a lot of probes for backdoors left by various worms.
Each time somebody tried to access one of these bogus urls, e.g. /system.exe, the server has to serve
up a 404 message. I did a little benchmarking on my laptop here at home (850 MHz PIII running XP)
and found that requests for bogus pages were being served up at about 4 requests per second.
Each time you get an erroneous request, plone executes standard_error_message.py, which
hands off to default_error_message.pt. It is possible to get a big speedup on generating this
404 page by creating a very simple page called default_404_message.pt inside the ZODB.
Then cache this page using a RAM Cache Manager and caching this new 404 page. To have this page
rendered when a 404 occurs, you need to add the following two lines to
Caching Pages 62
Chapter 1: Introduction
skins/plone_templates/standard_error_message.py, which parses errors in the
Plone site:
if error_type=='NotFound'
return context.default_404_message()
Using ab[1], I got 3.9 requests per second before the change and 37 requests per second after. Just to
put this in perspective, the client machine looked like it was getting a few dozen bogus requests per
minute. If I got 24 bogus requests per minute on my laptop, the 404s would end up eating about 10%
of my capacity. This technique will certainly help if you having to generate a lot of 404's for some
reason.
Caching Pages 63
[1] ab is a benchmarking tool that comes with
Apache and is a simple tool to stress test your
site. More information is available here
Packing Plone
Each change that occurs to an object in your Plone site is saved in the ZODB. This allows Plone to
procide the Undo capability and review or undo changes to files. However this means that all these
changes will be in the ZODB and can cause the ZODB to grow.
Regularly you will need to pack the ZODB to remove these changes if the database is getting too
large. To do this go to Control Panel −> Database, enter the appropriate age of objects to remove and
click Pack. Although packing will take some time, depending upon the size of your database, Plone
will continue to function.
Backing up Plone
When to back up
This really depends upon the amount of changes occuring in your site. If you have a very static site a
less regular backup (eg. once a week) might be more appropriate than a more frequently changing site
with regular backups (eg. once a night). You should take into account packing the database when
deciding a backup strategy.
What to back up
All data in your Plone site is stored in the Zope Object Database (ZODB). This ZODB is one file
called Data.fs. To backup, you must make a copy of this file. If you are unsure where this can be
found open the ZMI and go to Control Panel −> Database, you will see an image like the one below
showing database size and location.
[1] ab is a benchmarking tool that comes with Apache and is a simple tool to stress test your site. More
64 infor
Chapter 1: Introduction
In the same directory as the database you will also find the zope log files. You may, or may not wish
to back these up. The Plone, CMF and Product data will need to be backed up if you have made
custom changes to the filesystem code or plan to migrate to a new version of Plone, CMF or Zope.
Otherwise this does not need to backed up.
If you have a customised Plone that includes relational databases or stores data on the filesystem,
include this in the backup as well. This is not part of the standard setup though.
How to back up
Copy the files as mentioned in the section above. Most of the time this will just be the Data.fs file
mentioned above. This can be performed using python, or simple shell utilities. For example the
following script backs up a file then checks that md5 sums on the original and backup files are the
same:
#! /usr/bin/env python
import sys, md5, shutil
BLOCKSIZE = 1024*1024
def hexify(s):
return ("%02x"*len(s)) % tuple(map(ord, s))
def md5value(file):
f = open(file, "rb")
sum = md5.new()
while 1:
block = f.read(BLOCKSIZE)
if not block:
break
sum.update(block)
f.close()
return hexify(sum.digest())
def main():
args = sys.argv[1:]
if len(args) != 2:
sys.stderr.write("usage: %s src dest" % sys.argv[0])
sys.exit(2)
src = args[0]
dest = args[1]
shutil.copyfile(src, dest)
if md5value(src) != md5value(dest):
print "Error occured: md5 sums did not match"
if __name__ == "__main__":
main()
Note: on Windows you will need to stop Plone in order to perform the backup. This is not necessary
on most other platforms.
Note: it is recommended you do not rsync or scp the database over the network before making a local
copy − cp then scp. This will ensure transactions are not lost.
How to back up 65
Chapter 1: Introduction
Backing up is also covered in Chapter 23 of the Zope Book however at the time of writing there are a
few errors in that chapter. Please note we do not recommend rsyncing the ZODB directly.
Editor: Andy McKay $Id: 9,v 1.4 2003/07/05 16:49:07 zopezen Exp $
Previous [Chapter 8: Extending Plone] | Contents | Next [Chapter 10: Structured Text]
How to back up 66
Chapter 10: Structured Text
Basic text formatting
• Italicized text
Enter this :
*italics*
Enter this :
_underline_
Enter this :
**boldface**
• Text headers
Enter this:
My header
Subheading 1
Subheading 2
Subheading 3
To get this:
My header
If you enter a single line paragraph (e.g. like the one above and then indent the first line of the next
paragraph, the text in the one−line paragraph will be transformed into a header.
Note that the second paragraph in the section also has its first line indented.
Be sure to leave a blank line between paragraphs. This paragraph's first line is indented, too.
Subheading 1
Use additional indentation to generate subheaders. Notice that the subheading's level of indenting is
the same as the level for the previous paragraph, but that this paragraph is further indented. It's the
extra indenting of this paragraph that creates the subheading.
Subheading 2
Subheading 3
Preformatted Text
Enter this:
The next block of text will be formatted exactly the way I have typed it::
To get this:
My header 68
Chapter 1: Introduction
The next block of text will be formatted exactly the way I have typed it:
Enter this:
Some ordinary text here. Some 'preformatted text here'. More ordinary text.
to get this:
Some ordinary text here. Some preformatted text here. More ordinary text.
Lists
• Bulleted lists
Enter this:
* First item
to get this:
♦ First item
♦ Second item. Note that there is a blank line between each list item.
◊ Make lists within lists by using extra indentation
◊ Second indented item.
♦ Third item in the main list.
• Numbered lists
Enter this:
1 First item
My header 69
Chapter 1: Introduction
3 Third item in the main list.
to get this:
1. First item
2. Second item. Again, note that there is a blank line between each list item.
3. Third item in the main list.
Note that numbered lists cannot be embedded in bulleted lists.
• Definition lists
Enter this:
to get this:
First item
More information about the first item.
Second item
More information about the second item.
Third item
More information about the third item.
Links
• Links
Enter this:
to get this:
A link to CNN
• Email addresses
Enter this:
"address@example.com":mailto:address@example.com
to get this:
address@example.com
• References
Enter this:
My header 70
Chapter 1: Introduction
Later in the text I will have a footnotes
section.
to get this:
[1] My footnote. The initial whitespace controls indentation, then the two periods followed by the
space and the bracketed text create the anchor.
Images
• Images
Enter this:
<img src="logo.jpg" alt="Text shown when the browser does not load the image">
to get this:
Tables
• Tables
Enter this:
|−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−|
| Fruit | Nut | Mammal |
|====================================|
| Apple | Peanut | Squirrel |
|−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−|
| Orange | Macadamia | Woodchuck |
|−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−|
| Banana | Walnut | Dolphin |
|−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−|
| This spans 2 columns! | Cat |
|−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−|
| Pear | This spans 2 columns! |
|−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−|
My header 71
Chapter 1: Introduction
| This spans 3 columns! |
|−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−|
to get this:
Previous [Chapter 10: Structured Text] | Contents | Next [Appendix B: FAQ and Recipes]
• Appendix A: Resources
♦ Websites
♦ Development
♦ Learning Resources
My header 72
Appendix A: Resources
Websites
• Zope Labs is especially useful for Zope/CMF cookbook−style recipes and code snippets.
• Plone HOW−TO's usually contain up−to−date information.
• Mailing lists are the best way to communicate besides real−time chat like IRC.
• Python Cookbook is especially useful for new comers to Python
Development
• Collective is a community development initiative. People with proven Python skills can get access
and contribute their modules. Many modules are not released and are only accessible using CVS.
• Archetypes is the preferred way of generating classes for use with Plone. TTWTypes are another
interesting approach to constructing content objects with little to no programming.
• Zope CVS is a treasure trove full of goodies such as CMFStaging and PageDesign products. Many
things from CVS are ill−documented and requires a use the source approach.
Learning Resources
• The Pavoda Videos are a set of videos made at the Pavoda sprint. They cover many Plone topics
including: CMF Collection, CMF Member Groups, the Control Panel, Installation, and adding new
content. They are available in both English, Japanesse and German.
• The Zope Book is a complete set of documents for the Zope Application Server, which Plone is based
on. The Zope book will help power users or developers gain a better understanding how Plone works
under the hood.
Previous [Chapter 10: Structured Text] | Contents | Next [Appendix B: FAQ and Recipes]
Appendix A: Resources 73
Chapter 1: Introduction
◊ Is the content accessible through WebDAV, FTP or Microsoft Web Folders?
◊ Where is the CMF FAQ Located?
◊ I would like to contribute to Plone, How can I get involved?
◊ Why is the Plone Controller causing ZoneAlarm (or other firewall) to raise a
warning?
◊ What's this __getitem__ error?
♦ Recipes
◊ What version of Plone am I running?
◊ Where is Title and Description used? (mail templates and RSS feeds)
◊ How can I promote a member?
◊ Can I exist outside my Plone?
◊ Disable member joining
◊ Change the tabs for site navigation
◊ Authoring Links via WebDAV
◊ Make folders visible in left navbox
◊ Override slots in margins
◊ Fix cropping on Nav box root
◊ Why does the calendar only appear in the top folder?
◊ How can i get a listing of events, instead of a calendar?
◊ How do I turn off the About box for public viewers?
◊ I'd like my text full justified (or different font, font size, etc.)
Appendix A: Resources 74
Appendix B: Frequently Asked Questions and
Recipes
Alan Runyan:One of the mainstays of Zope is Acquisition. It is common to hear a guru say, "But no one
expects the Spammish Acquisition!" This usually means that someone has been piggy backing on Acquisition
without realizing it. One of the most common cases is when people write skins on top of Plone/CMF/Zope
and do not specify absolute url's to their resources. A common mistake is in a stylesheet. If you do not
absolute url the css i.e. site.css instead of http://site/site.css or /site.css your site will work − just fine. But lets
say you goto http://site/about/us if you rely on relative url's it will try to fetch http://site/about/site.css instead
of http://site/site.css − make your resources cache friendly on the browser; be aware of relative urls and
Acquistion. Now *you too can expect the Spammish Acquisition.
My Plone only stays up for a few hours or days on Linux, what could be
the Problem?
Alan Runyan:Plone is running on top of the Zope Application Server. By default Zope ships with it being in
debug mode, −D in the start script. When you run in debug mode all of the output is being logged to the
console. So if you start Zope in debug mode and you log out, the next time it has something to output it will
not find the controlling terminal (you had logged out) and will die. Remove the −D in the start script.
If you share keywords in the metadata they will automatically be associated. You can see this from the related
box. A good example is as follows: create a piece of content and in the metadata form add a keyword called,
TopicKeyword and then save it. Create another piece of content in the system and add a keyword to it called
TopicKeyword. When viewing either content you should be able to see the other content in a related box, on
the left hand side.
What is Syndication?
Syndication shows you the last ten update objects on a folder in RSS 1.0 format. This format is designed to be
read by other programs.
If you installed a product (such as ZopeZen) which creates a new skin (or if you created a new skin yourself)
and you switched to the new skin, your browser got a cookie called plone_skin corresponding to this skin.
Now you delete the skin, or the product supplying the skin, but you don't close your browser. If you now try
to view your plone sites, you'll get the traceback below:
Recipes
Recipes are a series of useful tips that people have found using Plone.
To find out the version of Plone, go to the Control Panel in your Zope site. If your Zope site is running on
http://localhost:8080/, then the Control Panel can be found by going to
http://localhost:8080/manage and clicking on Control_Panel in the folder list on the left.
Next, click on Product Management in the right frame, then click on CMFPlone. Click on the
Properties tab. The version number is listed beside version.
To find out your version of Zope, simply click again on the Control_Panel icon in the folder list. You can
find information there about the Zope version, the Python version, the operating system, and more.
Where is Title and Description used? (mail templates and RSS feeds)
When adding a new Plone Site, you are asked for a Title and Description. Where is that information used?
Primarily in RSS feeds and emails sent by Plone (e.g. during member registration).
The simplest way is to give them the Manager role. First, make sure they have joined the Plone site using the
regular membership process. Next, if your site is at http://localhost:8080/plone/, then go to the
Zope Management Interface (ZMI) at http://localhost:8080/plone/manage. In the folder list on
the left, click on acl_users. Click on the person's username, then multiple−click (shift−click on Windows)
the Manager role. Make sure the user still has the Member role before clicking Change.
The Manager role, though, gives them permission over everything in the site, including templates, user
management, and more. If you would prefer to only give them limited permissions, you can use Zope's
concept of local roles to give them more permission in just one part of the site.
To do this, navigate in Plone to the folder where you want the member to collaborate or take responsibility for
the content. Click on Switch to Contents view in the navigation box. Next, click on the tab for
local roles.
Giving them permission is a two−step process. First you find the member. Then you give them permission. In
Search by, choose User name and then provide the member's name in Search Term. Next, click on
perform search.
On the next screen you will see the Search results. In the Role to assign box, choose Manager. Then
click on assign selected role to user(s).
The local roles facility is very powerful and flexible. You can create new roles and customize the power given
to those roles. However, this power confronts you with the Zope security management interface, which isn't
for the faint of heart.
Yes, you can indeed keep your Zope user account and still be a manager or member inside a Plone site. Plone
will even create a Member folder for that account, while re−using the acl_users entry outside Plone. Plone
will not create a new entry in its own acl_users. Operations such as finding members in local roles,
mentioned above, still work by looking in acl_users folder of parents.
However, you will still miss a couple of items. If you want a portrait and member information, you need to
have an account inside the ports. That account can still have the same username as the account higher up in
Zope. However, they are two separate entries. For instance, changing the password for one will not apply to
the other.
Fortunately changing these tabs is easy. First, go to the ZMI for the Plone site. For instance, the URL might
be http://localhost:8080/plone/manage. In the folder list on the left, click on
portal_actions.
You will now see many "actions" separated by horizontal rule lines. Look for the actions with a Category
of portal_tabs. These are the actions that appear as tabs under the logo.
The easiest way to create a new action is to clone an existing one. Find the action with a name of Welcome.
Based on its contents, fill in the fields at the bottom of the screen, under Add an action. Click on Add.
The new action appears at the end of the list.
Next you need to put the new action in the right order by moving it up in the list. You may select (check)
multiple actions, and when you click "move up" or "move down", they will all move. So, after you've added a
new action, select all the actions between your new action and where you want it to be. Click "move down"
and it's there!
Since the new tab is used as navigation, it probably points to a folder in the site. Make sure this folder exists
and is published. If you are adding the folder now, make sure you add it from the Plone interface and not the
ZMI. Pointing the tab at a folder will also make content under that tab display a highlighted tab to indicate the
document is in that part of the site.
Fortunately, it is easier to hide or remove a tab. Find the action and uncheck the Visible? checkbox to hide
a tab. To permanently remove it, click the checkbox, scroll down to the buttons, and click Delete.
Our strategy for adding link support is to support the use of the Type header in the input document. For
instance, a new link object using structured text might look as follows:
http://www.plone.org/
Of course you might be lazy like me and only enter the Title, Type, and put the URL for the link in the
body.
Zope/CMF/Plone gives builtin support for authoring documents through DAV or FTP. You just need to know
the "source port" of your site. This is the port used in the −W argument to the Zope startup script. It is
discussed in the help text for the startup script.
However, authoring other content types takes some work. To start, you need to install Sidnei da Silva's
CMFCTRAddons from the Collective at http://www.sf.net/projects/collective. You might
need to get the file from the Collective CVS.
The basic theory is that the CMF has a content type registry that handles the way content is created. The
registry maps "predicates" (conditions in the request) to content types that can be added.
Once you have installed CMFCTRAddons, including the External Method to put them in your Plone site, you
can change your Plone site to allow links from WebDAV or FTP. First, go to the ZMI for the Plone site. For
instance, the URL might be http://localhost:8080/plone/manage. In the workspace (the right
frame), click on content_type_registry.
The Edit Predicate List screen lets you add conditions (called "predicates"), change predicates, or
re−order the precedence in which they apply.
In the Add predicate: box at the bottom, enter rfc822link as an identifier. This text could be
anything you want, it just has to be unique. In the select list next to the Add button, choose
rfc822_headers. Next, click Add. You now have a predicate with a label rfc822link
[rfc822_headers]:. Choose Link for both select boxes in this predicate. Next, click Change.
One more tedious step. We need to move this predicate up in precedence. Otherwise our items created through
DAV will still be documents. Click on the Up botton for the rfc822link predicate until it is at the top of
the list.
You can now try adding links via DAV. Note that the CMF has some unusual behavior regarding DAV. For
instance, line endings in structured text are always converted to Windows line endings. Authoring from a Mac
can produce very unusual results.
For instance, to get rid of the calendar, start by visiting the ZMI for the Plone site. For instance, the URL
might be http://localhost:8080/plone/manage. Find the folder where you would like to hide the
calendar. In our case we will choose the root folder of the Plone site, since it already has slots set.
In the root folder you will see a ZMI tab called Properties. Click there and scroll down. You will see two
properties called left_slots and right_slots. These are multivalue "lines" properties that define the
objects, and object ordering, for the slots.
Now visit the home page of your Plone site. The calendar should not be visible.
As an additionaly exercise, a previous recipe removed the permission for people to join the site. But the login
box is still displayed for anonymous visitors. One solution is to remove the login box from the left_slot.
limi: yup
limi: cropping
ev: ahh
limi: right_slots
ev: ahhh
ev: in your opinion (IYO), the calendar is or isn't a useful nav tool for my site?
limi: I like it
limi: filesystem
limi: plone_templates/ui_slots/event_slot.pt
ev: ok
I'd like my text full justified (or different font, font size, etc.)
ev: the text is full justified
limi: yes
limi: yes
Page Editor: Andy McKay $Id: b,v 1.3 2003/09/14 16:28:51 yenzenz Exp $
Previous [Appendix B: FAQ and Recipes] | Contents | Next [Appendix D: About this book]
Previous [Appendix B: FAQ and Recipes] | Contents | Next [Appendix D: About this book]
This book is an experiment in Open Source publishing supporting an Open Source software product, Plone,
intended both for a general audience of end users and for developers. Open Source products addressing the
needs of ordinary users are pretty rare. In fact, the lack of good, comprehensible documentation keeps Open
Source out of reach of many who might otherwise dive in! In this appendix, we explain how we hope to build
this book and how you can contribute, to support the ongoing evolution of Plone.
Book mechanics
It is written using structured text and stored in cvs at Sourceforge in the plone−docs project.
Documentation Process
This is the process for writing documentation. It is intended as a guideline.
• People write documentation in whatever form where ever they choose. This makes it easy for a
someone to write documentation by lowering the boundary.
• They send an email to plone−docs giving the location of the documentation they have just written.
This might be an long email, wiki, text file.
♦ An editor reviews the documentation and if appropriate includes it in the book
♦ A credit will be given to the author [2]
♦ The documentation will edited as needed to fit in with the rest of the book in terms of style
and content
♦ The editor adds in the documentation
• The editor sends an email to plone−docs and the documentation author letting him know the change.
• When a new release occurs, if that documentation is no longer relevant or incorrect, the original
author will be contacted for an update.
Readers roles
These are the suggested roles are readers will have:
Site User
The person who goes in and adds content, writes docs and so on. Has very limited security.
Site Manager
The person who manages the site, fiddles with tabs, slots and so on. Does the reviewing of content and
modifying of roles. Might even delve into the css and HTML.
Site Administrator
The person who installs and looks after the administration of Plone usually combined with one of the other
roles. More concerned about things like Apache integration etc. Not really covered much in this book.
Developer
The person who develops new code for the site with new Products and or skins.
Editors
Andy McKay
Andy runs ZopeZen and Agmweb Consulting. As a result he spends far too long on the computer most nights.
When not sat in front of computer Andy can be found walking his dog, fixing the house, surfing or his
favourite past time, white water kayaking.
Page Editor: Andy McKay $Id: d,v 1.4 2003/07/05 16:49:07 zopezen Exp $
• Glossary of Terms
[A]
Action
In Plone terminology, "Actions" are a configurable way of providing navigational elements in a site.
Some examples would be Search, Browse Folder, Logging in etc. See Chapter 5 of this
book for more details.
Actions (Portal) ("Portal Actions")
"Portal Actions" affect the whole site, as opposed to the "Content Types" that are more localized.
Acquisition
Acquisition is a Zope mechanism for inheriting object properties. Zope Object hierarchy is built using
Acquisition, and makes heavy use of it
◊ What is Acquisition?
◊ Acquisition Algebra
Anonymous Role
This is a Standard Role in Zope Security Architecture. Anonymous role is assigned to a site visitor
until they login using their zope id/password.
Archetypes
Framework for the development of new Content Types in Zope/CMF/Plone.
Authenticated User
An Authenticated User is a user who is logged in to Zope system. According to The Book of
Zope, "If No user is currently logged in, Anonymous users are
considered the Authenticated User".
Authentication
This is the identification process used by Zope.
[B]
Base Class
A Base Clase or Top Class is a class which passes its methods, properties etc. to its subclasses.
The subclasses inherit the properties and methods of their Base class.
Box
box stub
[C]
Calendar
The portal_calendar allows for a mechanism to administer what content is shown in calendar.
Catalog
The catalog is an internal index of the content inside Plone so that it can be searched. The catalog
object is accessible through the ZMI as the portal_catalog object.
CSS
Cascading Style Sheets
Class
A Class is the "Mold" from which objects are stamped out. Objects are instances of a class. Class can
be thought of as a blueprint for an object.
Class Constructor Method
Glossary of Terms 88
Chapter 1: Introduction
A constructor method for a class is a method which allows execution of certain actions as soon as a
class instance is created, and before it is started to be used. For example, setting the standard attributes
would be done in a Constructor Method.
CMF
The Content Management Framework is a Zope addition to provide services that a Content
Management system needs. See ZWACK Chapter 5 (dated)
CMFTypes
old name for [A]rchetypes
CMS
A Content Managment System is a system to, well manage content.
Content
In the CMF worldview, everything is content. This applies to traditional things such as HTML pages.
But it also applies to dynamic information such as posts in a threaded discussion or calendar events. It
also means that images, dowloadable executables, logic in scripts, etc. are also content.
Content Type
Content Type is the type of content allowed in a CMF/Plone instance. Plone comes with stock
Content Types, but you can create your own content types specific to your needs and plug them
into your Plone instance.
Cookie Authentication
cookie_authententication aka CookieCrumbler allows form based login.
[D]
DTML
Document Template Markup Language. DTML is a server side templating language used to produce
dynamic peices of content, it is primarily used in conjunction with HTML.
Discussions
The portal_discussion tool holds the policy regarding how the discussions work in a Plone
system.
[E]
External Method
External methods are essentially Python modules sitting on the file systems linked into Zope via the
external method object that you can create from the drop down list. External Methods are more
powerful than Python Scripts because they are not subjected to the Zope Security Architecture
as rigourously as the Python Scripts may be.
[F]
Factory
factory stub
Folderish Object
A Folderish object in zope is an object that can contain other objects. The Folder and Plone
Folder objects are examples of Folderish Objects.
Factory Type Information (FTI)
FTI stub
[G]
Globbing (ZCatalog)
Glossary of Terms 89
Chapter 1: Introduction
You can create a ZCatalog with globbing turned on, you can later on search the ZCatalog using
wildcards (* etc.). Globbing also enables partial word searches in that ZCatalog.
[H]
HTML
Hypertext Markup Language
[I]
Instance
Objects are also called Instances. An Instance or Object is an instance of a given Class.
i18n
Internationalization is preparing a program so that it can be used in multiple languages without further
altering the source. For a more technical discussion, see this article. The term i18n is formed by the
first and last letter of the word and the number of letters in between. Also see this HowTo by
Alekibango.
Interface
See Interface based programming (EVIL EMPIRE ALERT!!)
[J]
Javascript
Is the language that is shipped with web browsers that allow them to make web pages dynamic. A
good example of Javascript is in the Properties tab when you add keywords.
[K]
Keywords
in the Properties tab of content you can assign Keywords also known as Subject in Metadata
terminology. This is a mechanism that allows you to relate content to each other. Keywords can be
predefined in the portal_metadata tool.
[L]
Layer
A Skin in Plone is an enumerated collection of Layers. Skins can be managed at
portal_skins/manage_propertiesForm. All the folders in portal_skins can function
as layers in a skin.
Layers are not currently circumscribed in what they can do. They can change visual aspects of a Plone
site (eg. plone_styles/mozilla), they can surface new content types in a more or less
presentation−neutral way (eg. plone_3rdParty/CMFCalendar), or they can change/override
the behaviour specified in other skins.
Glossary of Terms 90
Chapter 1: Introduction
Login
This is the process you go thru when you enter your userid, password on the login screen. Same as
authentication.
l10n
Localization is the actual preparing of data for a particular language. For example Plone is i18n aware
and has localization for several languages. The term l10n is formed by the first and last letter of the
word and the number of letters in between.
[M]
Manager
The Manager Security role is a standard role in Zope. A user with the Manager role has ALL
permissions except the Take Ownership permission.
Meta Type
This is a unique string for each Zope Product in the 'Available Objects" Menu in Zope Management
Interface (ZMI). Product instances are created using this Meta Type. Each product has a unique
Meta Type.
Metadata
See Dublin Core Metadata Initiative
METAL
Macro Expansion for TAL (See TAL [T])
Memberdata
In Plone, portal_memberdata allows decoupling of storage of user attributes.
Migration
Migration is the mostly automated process through which you upgrade your plone instance to a
new release level.
[N]
Namespace
A NameSpace contains the names of all valid variables of a given class instance (an Object) in a
specific scope.
Non Folderish Objects
These are objects that Cannot contain other zope objects. For example, DTML documents or Files
cannot contain other Zope objects.
Navigation Properties
(as in CMFPlone/data/navigation_properties)
[O]
Object
An object is an Instance of a Class. (See Class [C] )
Object DataBase (ODB)
a system that stores a heirarchy of instances. The ZODB is an example of a Object Database. You can
not query Object Databases like you can their Relational breathren. Object Oriented Database Facts
gives some more insight into OODBMS.
Owner Role
The Owner standard zope role has the Take ownershhip permission given to it by default.
Ownership (of objects)
Users who create objects in Zope are given ownerships of those objects. Every object in Zope has an
owner except perhaps the ones that are created by the Zope Install process.
Glossary of Terms 91
Chapter 1: Introduction
OOTB
Out Of The Box. Plone is an example of an OOTB web application.
[P]
Permissions
Permissions are also called Rights in zope speak. They tell you what actions a user can take while
in Zope. Permissions can only be applied to Roles. You CANNOT give permissions directly to
Individual Users.
Properties
Essentially these are the attributes of any given object. You can see a Zope object's properties by
clicking on the Properties Tab in the ZMI when you are Viewing that particular object.
Properties is also used on objects in the Plone interface to describe properties an object might have,
such as keywords.
Plone
"Dude/tte, if you don't know, I'm not gonna tell you"
Portal Type
Portal Type is a unique string for each Content Type in Plone. In Plone each Content Type will have a
unique string to identify it, although they may be based on the same Meta Type.
Python
Python is an object oriented high level scripting language. Zope is written in Python.
[Q]
QuantumLeap
When viewing large result sets in Plone you will notice they are presented in pages. You can Leap
to any of these pages and the navigation will display near−by pages. This mechanism is
affectionally known as QuantumLeap(ing).
[R]
Registration
More specifically, portal_registration controls the site−wide policy for how users register
with the system.
Request
Each page view by a client generates a request to Plone. This incoming request is encapsulated in a
request object in Zope, usually called REQUEST or request.
Response
For each request a complimentary response is generated. This outgoing request from Zope is
encapsulated in a response object, usually called RESPONSE or response.
Repurposing
Content types can be based off other content type metadata, FTI. You can then specify unique
metadata attributes for new content type such as: id, title and description.
[S]
Services
The goal of the CMF is to unify the management of content and apply a suite of services. These
services include cataloging, workflow, and syndication. CMF+Plone provide many services to your
site. There are publicly available services like search and discussion, and management services such
as workflow.
Glossary of Terms 92
Chapter 1: Introduction
Skin
Think of skins as the look & feel part of a Plone experience. A skin contains the HTML, CSS,
JavaScript, Images and all the interactions between the user and the Plone. Different skins can be
apllied to the same content, meaning a content can be viewed in many different ways. Some skins
provide extra features and pages over others.
Slots
Slots are the little sections on a plone site that manifest themselves as little boxes on the left and right
side of a plone instance. Consequently, they are also referred to as left_slots , right_slots.
You can access slots for a Plone Instance by selecting that object, and then click on Properties.
Along with other properties, you will see left_slots &right_slots as Lines . See Chapter 5
of this book for more information.
Syndication
Syndication is the process by which a site is able to share information with other sites. Content
syndication in the CMF allows you to make content available to other sites. The Syndication Tool
allows site managers to control sitewide syndication of content. Syndicated content is made available
in RSS format for folders where syndication has been enabled.
[T]
TAL
Tag Attribute Language. TAL Wiki
TALES
TAL Expression Syntax. See Also [M]ETAL TALES Wiki
Tool
A tool is an instance of a class inside the Plone site. However, unlike other objects, there can only
ever be one instance of a particular tool inside a Plone site at any one time. Some tools, such as
portal_catalog, give administration options for the site manager.
[U]
UI (User Interface)
The screens and way in which you interact with a software program.
[V]
View
A presentation view displays information in a predefined structure. The actions in portal_types for
instance are views.
[W]
Workflow
Explain this at the business process level in content object context.
[X]
Xopus
Xopus "is a browser based in−place wysiwyg XML editor. Xopus allows users to edit their XML data
in an intuitive word processor alike way. Xopus allows common users to edit complex XML
documents without knowing anything about XML without even realising they are editing XML."
Plone 1.0 is expected to have Xopus support Out of the box.
Glossary of Terms 93
Chapter 1: Introduction
XML
"eXtensible Markup Language" is a standard for data interchange
[Y]
[Z]
Zope
Zope is an open source web application server written in Python. Plone uses Zope.
ZMI
Zope Management Interface. This generally refers to the Web Interface used for Zope Management
and Administration. (when you login using http://your.zope.site:8080/manage manage at the end)
ZPT
Zope Page Templates. See:
◊ Zope Book − ZPT (Chap 5)
◊ Zope Book − Advanced ZPT (Chap 8)
◊ Zope Book − Appendix C (ZPT Reference)
ZPL
Terms under which Zope is licensed.
Page Editor: Amr E. Malik $Id: e,v 1.3 2003/10/09 11:22:29 yenzenz Exp $
Glossary of Terms 94