Personal tools
You are here: Home Documentation Tutorials Understanding and Using GenericSetup in Plone Introduction
Support

Get Help

Join our chat rooms or support forums if you have more specific questions.

Plone Training
Learn how to design, build, and deploy a website in Plone through one of the numerous Plone training sessions around the world.
Find Plone training…
 
Document Actions

Introduction

An introduction, wherein we learn what GenericSetup is and why we even care. This tutorial is slightly out of date, but still quite relevant to Plone 3.0+. Some of the "future items" have been addressed, and additional work is being done in this area.

Rob Miller

A detailed look at GenericSetup, wherein we will learn what it is and how it can be used within Plone.
Page 1 of 10.

What is GenericSetup?  I'm glad you've asked... of course, since I'm the one writing this tutorial, you really didn't have much choice but to ask, did you?  But even though I put the words into your mouth, I think that in the end you will also be glad you asked.  GenericSetup is a major step forward in managing Plone site configuration, and as of Plone 2.5 GenericSetup is a core part of how Plone handles its own site creation process.

Okay, that's all well and good.  But what is it?  Simply put, GenericSetup is a Zope-based toolkit for managing site configuration.  Not much clearer?  Maybe this would work better as a story:

Meet Guy Ablaze.  Guy is a Plone site developer, who manages websites built with Plone, and even develops add-on products for Plone using Python.  Guy never uses Plone just out of the box.  Instead, he does a lot of customization for every site he deploys.  All of his sites have custom skins, where the CSS and template modifications live.  A lot of his sites use custom content types.  Rarely does he find that the default site tabs are to his liking; he often replaces those with custom tabs.  And there are a myriad of little tweaks and adjustments that he makes to each site, to get it working just so, to satisfy his demanding customers' diverse requirements.

Guy knows that it is a good idea to be able to recreate a customer's site without having to do a lot of twiddling in the ZMI, so he creates install methods for each of the sites that he manages.  These install methods are written in Python.  Each one is comprised of a bunch of steps.  One step is to install custom skins, containing the site's look and feel.  Another step might be to install some custom types, while a third customizes the site tabs.  And of course there are a bunch of little steps that correspond to all of the miscellaneous tweaks that he's made.

Guy is reasonably happy with this arrangement, but, you know, there are some ways that it could be better.  First, he finds that he has to write a lot of repetitive boilerplate code in his various install methods.  Also, using Python instructions to describe how his site should be configured doesn't really fit his brain.  He'd much rather just be able to make a list of the types he wants and have them automatically get installed.  Also, it would be great if he could not only import site configuration, but export site configuration.  As in, he could make some changes to the site, maybe using the Plone interface, maybe using the ZMI,
and then be able to spit that out to be loaded somewhere else.  And, wow, the mind boggles... wouldn't it be great to be able to compare site configurations?  To be able to ask "What has been manually changed in my site since I did the original installation?" and get a meaningful answer?

All of this and more is what you get when you use GenericSetup!


I know, I know... It's tremendously exciting!  I'll give you a minute to pick your jaw up off the floor, to fully react to and conquer your disbelief before going on.

.... time passes ....

Recovered yet?  Good, then let's learn more...

 
by Rob Miller last modified July 25, 2008 - 22:19 All content is copyright Plone Foundation and the individual contributors.

For any issues with the web site functionality, please file a ticket.

Please consult the policy on plone.org content if you want your content published on this site.

Servers and hosting by