Personal tools
You are here: Home Programming Learning Python Introduction to Plone

Introduction to Plone

by Brent Woodruff last modified Jul 24, 2008 12:51 AM

Plone: Python on the web

Introduction

Plone Bootcamps

"Affordable, High-Quality Plone Training"

Installation

Instructions for...

First off, you'll need to get Plone installed on to your platform of choice. The normal way of doing that is to use the Unified Installer provided on plone.org. This is not a watered down version of Plone for dummies that can't roll their own; quite the opposite, actually. The community that provides help with Plone prefers that people use the unified installers for consistency and simplicity. Additionally, it is nice to use the unified installers because they provide a local version of Python for Zope and Plone that is guaranteed to work and won't interfere with your system version. Everything is even compiled from source on Linux!

Once you have Plone installed, start the server (this is also a little different depending on the platform and detailed on their specific pages) and direct your web browser to http://localhost:8080 - this should bring up the Zope start page.

The ZMI and your Plone site

The Zope Management Interface (ZMI) is the central control panel for the Zope application server. You can create and manage Plone web sites and other Zope applications from the ZMI.

  • Zope: http://localhost:8080
  • ZMI: http://localhost:8080/manage_main
  • Plone: http://localhost:8080/PloneSiteId
  • Control Panel: http://localhost:8080/Plone/plone_control_panel

To enter the Zope Management Interface (ZMI), go to http://localhost:8080/manage_main. The password you are prompted for is randomly generated and in the Plone installation directory if on Linux or Mac, and is prompted for during installation if on Windows.

The ZMI will list a number of things at the root location ( / ). Look for the Plone logo icon under the type column; place your mouse over the icon and see if the type pops up as "Plone Site." If you do not have a Plone site already, add one by selecting "Plone Site" from the add menu in the upper left hand corner. For the sake of simplicity, I will assume that you use the Id Plone when creating your site. The Id provided will determine the URL (http://localhost:8080/Plone), while the Title and Description should be friendly and informative. Ultimately the Id does not matter because most people will want their Plone site to be at the root of their domain. Don't modify the other settings and click "Add Plone Site." Navigate to http://localhost:8080/Plone and you should see a default Plone website!

Adding Content

Think of your site as a folder on your hard disk drive. Browse to where content should be, then add it to that location. You can also rename, cut, copy, and paste.

Content items in Plone are 'living, breathing' Python objects.

 

Content Types

  • Folder - Like a folder on your hard drive
  • Page - HTML document with links, etc
  • File - Any kind of file; Word, Excel, PDF...
  • Image - A picture file; JPEG, PNG, GIF
  • News Item - Like a blog entry
  • Event - Time and place; shows in the calendar
  • Collections (aka Smart Folders)...

Collections

  • Canned Queries
  • "All News Items less than one month old with the 'Gaming Club' keyword"
  • Generates RSS feed
  • Can nest, searching in results of parent

Views

Views change the way content is displayed. The default view can be changed by the owner of the content (and others with permission), but the user can also change the view with the URL.

  • http://site.com/container/item/view

Installing Products

Any time that there is a change to the contents on the filesystem, Zope must be restarted.

Users and Groups

  • Admin is a Zope user, universal to all Plone sites on Zope server
  • Create users and groups per Plone site
  • From Plone Control Panel:
    • http://localhost:8080/Plone/prefs_users_overview 

Permissions

Content added to a Plone site is always security aware, even for multiple views (Page, Search, RSS, Collections). Content protects itself from unauthorized access.

  • Add Portal Content
  • Modify Portal Content
  • View
  • Roles are groups of permissions

Workflow

CSS and Skinning

  • Override Plone CSS
  • http://localhost:8080/portal_skins/plone_styles/ploneCustom.css/manage_main
  • Customize Templates and CSS in the  Portal Skins Tool
  • http://localhost:8080/portal_skins/manage_main
  • Create your own Plone theme
  • DIYPloneStyle Product

Creating Content Types

  • Archetypes + ArchGenXML + ArgoUML = Fun 

Development and Debugging

  • Firefox Web Developer Extension
  • Launch Zope in the Foreground
  • Check Plone control panel
  • Look at Plone logs
  • Look at Apache logs

Apache Proxy

  • ProxyPass
  • Rewrite Rules
  • Virtual Host Monster
<VirtualHost *:80>
    ServerName my-example-domain.com
    ServerAlias my-example-domain.com
    ServerAdmin your-email@my-example-domain.com

#   ProxyPass / http://localhost:8080/VirtualHostBase/http/%{SERVER_NAME}:80/Plone/VirtualHostRoot/
#    ProxyPassReverse / http://localhost:8080/VirtualHostBase/http/%{SERVER_NAME}:80/Plone/VirtualHostRoot/

    RewriteEngine On
    RewriteRule ^/(.*) http://localhost:8080/VirtualHostBase/http/%{SERVER_NAME}:80/Plone/VirtualHostRoot/$1 [L,P]
</VirtualHost>

Caching

  • CacheFu Product
  • Apache Caching
  • Squid Cache
  • More Techniques (high performance plone)

 

Document Actions