We can modify quite a bit of our Plone site by changing property definitions and using the ZMI. But if you really want to change your Plone site, you need to modify the page templates (ZPTs) that come with the system. This is easier said than done. The default ZPTs are stored in the filesystem, in such directories as $ZOPE_ROOT/lib/python/Products/CMFDefault/skins (for CMF content) and $ZOPE_ROOT/lib/python/Products/CMFPlone/skins/ (for Plone content). Modifying the skins within these directories affects all Plone instances, which is not what you want.
Plone takes this possibility into account and allows you to copy one or more ZPTs into Zope's object database (ZODB), where you can edit it as you would any other ZPT. For example, from within the ZMI, enter the portal_skins tool and then the plone_templates folder within portal_skins. plone_templates looks like a normal Zope folder (aside from the different icon), but it reflects the contents of files on disk rather than those within ZODB. plone_templates contains the ZPTs for most of the pages you see within Plone. The ui_slots folder within plone_templates contains ZPTs that determine how the portlets look.
If you want to modify the header that appears at the top of each page within your Plone site, you can click on the header icon. This brings you to a page that lets you view, but not modify, the header page template. In order to modify the header, you must export it to the custom folder, which exists only within ZODB. Click on Customize, and you can see that the URL has hung within the ZMI, putting you now within portal_skins/custom rather than within portal_skins/plone_templates. This custom folder is the central repository for all customized templates, and you can edit them as you would any other ZPT on the system. Because the custom folder is specific to each instance of Plone, you can be sure that any changes you make affect only what you are working on.
Of course, this means you might be in for a surprise or two. My father, who used Netscape 4 until quite recently, complimented me on my new site and on the fact that it chastised him for not using a more modern browser. Because I have long been using the latest versions of Mozilla and Galeon, I hadn't ever seen this message; it never occurred to me that one would appear. The Web would be a better place if every application were so clever and conscientious about checking cross-platform compatibility.
Plone is probably the best-known and most popular application written with Zope's CMF, one that is powerful and easy to customize. Between Plone-specific customization screens, changes that we can make with the ZMI and modifications to the page templates by importing them into the custom folder in ZODB, we can change things in a great many ways. We also can add new custom skins to Plone, contributing to the already interesting and varied options that come with the distribution.
Of course, Plone is only one application built using Zope's CMF. Next month, we will peel away another abstraction layer, looking at the CMF directly and seeing what sorts of applications we can create with it. As you will see, there is good reason why the CMF is attracting a great deal of attention in the Zope community, as well as from Zope Corporation itself.
Reuven M. Lerner (email@example.com) is a consultant specializing in open-source web/database technologies. He and his wife, Shira, recently celebrated the birth of their second daughter, Shikma Bruria. Reuven's book Core Perl was published by Prentice Hall in early 2002, and a second book about open-source web technologies will be published by Apress in 2003.
Webinar: 8 Signs You’re Beyond Cron
11am CDT, April 29th
Join Linux Journal and Pat Cameron, Director of Automation Technology at HelpSystems, as they discuss the eight primary advantages of moving beyond cron job scheduling. In this webinar, you’ll learn about integrating cron with an enterprise scheduler.Join us!
|Play for Me, Jarvis||Apr 16, 2015|
|Drupageddon: SQL Injection, Database Abstraction and Hundreds of Thousands of Web Sites||Apr 15, 2015|
|Non-Linux FOSS: .NET?||Apr 13, 2015|
|Designing Foils with XFLR5||Apr 08, 2015|
|diff -u: What's New in Kernel Development||Apr 07, 2015|
- Drupageddon: SQL Injection, Database Abstraction and Hundreds of Thousands of Web Sites
- Play for Me, Jarvis
- Non-Linux FOSS: .NET?
- Designing Foils with XFLR5
- Not So Dynamic Updates
- Flexible Access Control with Squid Proxy
- New Products
- Users, Permissions and Multitenant Sites
- diff -u: What's New in Kernel Development