Views
This guide is intended to shorten the learning curve and make it easier for Plone newbies to get up to speed.
The purpose is to inform developers who are new to Plone about the available resources and provide a collection of useful documentation.
Table of contents
- What is Plone
- Getting and installing Plone
- Documentation for developers
- Getting help from other Plone users
- Editing scripts and templates
- Extending Plone with add-on modules (to do)
What is Plone
Plone is an open source content management system built on top of a web application server called Zope.
The Plone.org homepage gives a good overview of what Plone is, and with the release of Plone 2.0, a comprehensive tour of its features is now available.
Getting and installing Plone
There are several ways to install Plone: using an installer, installing from a tarball and fetching via CVS. The alternative way is installing using a package, but you should be aware that the packages are often not very current, so it's not the recommended way.
Using an installer
Using one of the installers is by far the easiest way to try out Plone on your local machine, before deciding to deploy it on a server machine.
The installer provides a point-n-click interface for installing Plone, and also installs all the software that Plone depends on (Zope, Python, CMF).
Plone 2.0 is the latest version, so if you are just starting out with Plone, don't bother with version 1.0.
You can find the MacOS? X and Windows installers on the plone.org download page.
Using a tarball
You can also install Plone using the tarball (usually called CMFPlone-2.0.tar.gz). This assumes that you already have Zope installed on your machine, and installing Plone is simply a matter of dropping CMFPlone? and all of the related products into your Zope Products directory, and restarting the Zope server.
Getting Plone via CVS
Since the development of Plone is an ongoing process, developers use a tool called CVS to submit bug fixes and keep track of changes. On plone.org, you can read about how to use CVS to get the most recent version of Plone.
Documentation for developers and tips
Many newcomers to Plone complain that documentation is scarce. Nothing could be farther from the truth. There is plenty of documentation, it is just scattered about and hard to find if you don't know where to look.
How to be a programmer is a very comprehensive document about being a programmer including best practices and tips.
General documentation
The plone.org documentation page has a good selection of links to documentation, including the How tos section which is a collection of tips added voluntarily by Plone users. It's a growing body of knowledge, and you are sure to find some useful tips on this page.
Python, ZPT (Zope Page Templates) and Archetypes are the building blocks to developing with Plone, so below I have highlighted a few links to point you in the right direction.
Python
Python is the programming language used to develop Zope, and likewise used to develop products for Plone. Python is an object oriented and interpreted language, and is considered by many programming gurus to be of exceptional design.
Mark Pilgrim (author of Dive into Python) recommends this 10 Minute Introduction to Python.
Bruce Eckel is writing a book Thinking in Python which you can download here
"When you're writing working code nearly as fast as you can type and your misstep rate is near zero, it generally means you've achieved mastery of the language. But that didn't make sense, because it was still day one and I was regularly pausing to look up new language and library features!" - Eric S. Raymond
ZPT
For the presentation layer a templating language called ZPT (Zope Page Templates) is used. You may come across some older products that are using dtml, but ZPT is the preferred way of doing it now.
- Introduction to Zope: A Tutorial
- This tutorial will take you, step by step, through building a basic Web application in Zope. As we go through the tutorial, we will examine some of Zope's main concepts at work. Using Zope Folder, Script (Python), and Page Template objects, we'll create a simple Web site for an imaginary zoo: the "Zope Zoo", of course!
- Using Zope Page Templates
- Advanced Page Templates
- ZPT Basics - Part 1 and Part 2, Part 3, Part 4
- More ZPT documentation links
Archetypes
Archetypes is a new way of constructing content type based products for use in Plone, and uses a schema-based approach. This is now the preferred way of adding new content types to your Plone site.
- Content type tutorial
- A new page of helpful tips and a fine example for those seeking to use Archetypes to create their own custom Content Types. Much borrowed from some of the initial documentation, I hope this is slightly more accessible - I have also corrected some of the mistakes and provided a helpful section on installing your content type at the end.
- Intro to Archetypes
- by Sidnei da Silva, one of the co-creators of Archetypes, provides a
Hello worldexample, and is a good starting point for learning about Archetypes. Part II is now available (ask Nate for the zopemag.com access info)
- The Archetypes Developers Guide is the definitive resource for Archetypes development.
- Subscribe to the Archetypes mailing list and visit the #archetypes IRC channel.
Getting help from other Plone users
The Plone community is very friendly and if you can figure out how to do something from the documentation, you can usually get an answer by posting a question to the lists, or asking in the IRC chat channel #plone.
Lists
The plone.user list is a good place to ask questions, but you should search the archives first to see if anyone else has already answered your question before you post.
Highly recommended reading is Eric S. Raymond's How to ask questions the smart way
While you can read the messages through the web using gmane, you may want to configure a newsreader (using Outlook or Mozilla) since it makes it easier to track the messages and threads you are interested in.
Or if you prefer to get the messages directly into your email, you can also subscribe to the list. Just make sure you set up a filter, or else your inbox will quickly be swamped!
The plone.org site has a nice overview of the various Plone lists.
Chat
In addition to the lists, there is a very active IRC community on irc.freenode.net where you can post your questions and often get a response within a matter of seconds!
The main channels that I frequent are #plone, #plonedesign, and #archetypes.
A popular program for accessing the IRC network is mIRC or you can just use the ChatZilla? tool in Mozilla.
There is a page on plone.org which describes how to chat via IRC.
Editing within Zope
There are several ways that you can edit objects in your Zope site. The obvious way is to edit the files on the file system. However, the disadvantage of doing it this way is that every time you make a change to a file, you have to refresh the product, or worse - restart the Zope server.
Make a copy using custom
The preferable way is to find the object that you want to edit (if you don't know where it is located, you can use the Find tab), and then make a custom version of the object. This will place a copy into the custom folder in your portal_skins directory.
Once the file is in the custom folder, you can either edit it directly within the ZMI, or edit is using the ExternalEditor?.
Editing the files with an external editor
The ExternalEditor? is a very useful tool which allows you to edit objects in the ZODB using your favorite text editing program, or in the case of images, your favorite image manipulation program (Photoshop, etc.)
To edit an object using an external editor, you click on the little pencil icon next to the object's name. This will tell your browser to launch the external editor and pass a reference to the actual object. When you save in your editor program, the object is immediately saved in the ZODB!
Here is a good howto for setting up ExternalEditor.
Edit the files via WebDAV?
This is also a really slick way to edit the files. You can mount the ZODB as a WebDAV? volume and then just open the volume as you would do the C: drive on your desktop. This webpage explains howto edit via WebDAV and FTP
If you are just editing content (not actual code), you may want to configure OpenOffice? or MSWord? to be your editor. This webpage explains howto get WebDAV working with OpenOffice and MSWord
Enable the WebDAV? source port
In order for the WebDAV? editing to work, you must enable the WebDAV? source port in the zope.conf file. Normally you can just uncomment the following lines.
<webdav-source-server>
# valid keys are "address" and "force-connection-close"
address 1980
force-connection-close off
</webdav-source-server>
Then you would mount the WebDAV? server on your machine using the address: http://machinename:1920/