Creating public websites with staging and custom skins
This Tutorial applies to:
Plone 2.1.x
This Tutorial is intended for:
Site Administrators
optilude
All content on one page (useful for printing, presentation mode etc.)
- Introduction Why would you want to do this?
- Pieces of the puzzle Several technologies are involved in this set-up. It is important that you understand what each of them does.
- Setting up Plone With the server set up, a Plone instance created and products installed, we must configure the Plone site to work with staging.
- Configuring your web server With Zope and Plone set up, you need to set up Apache or IIS so that the public site and the private site are on separate URL
- Trying it out With all the pieces in place, you can try out your new staged site.
- Taking it further The solution we have outlined is fairly flexible. However, not all content makes sense to stage. There are also many other ways of using EnSimpleStaging to stage content.
This is exactly correct!
This is a good approach
One thing I setup the other day was a simple hide/show workflow with a 'triggerIncrementalDeployment' script called after each workflow transition. Then I have a staging area just for our Job Postings. This seems to work quite nicely for our admin staff who found the whole "go to the Deploy Stage page and click 'Incremental Deployment'" rather intimidating. My one liner looked like this:
# triggerIncrementalDeployment.py
# parameters: state_change
state_change.object.script_workspace_publish_stage(
IncrementalDeployment=True,
label=None,
comment='Workflow auto deployment',
queued=False )
Workflow is It!
It's nice to be able to 100% decouple the change management from Plone and your custom retail/delivery skin. I hope more people can provide insights and scripts like the one you provided.
http://www.envymags.com/ is a small site I put together for a Houston magazine. It took me almost no time at all. The retail skin is 100% z3 views + zpts. The only 'Plone' work that had to be done is building out 2 custom content types & install CompositePack. The left/right sidebars are controlled with CompositePack; point 'n click & drag 'n drop. Very nice.
Deployment permissions
I want to set things up so a subset of my publishers have the right to deploy the site. I don't really want to give them the manager role. There are probably many ways to do this, I did it as follows:
The deploy transitions in the staging_workflow need the "Use version control" permission, so I've added a "deployer" role[1] to the root of my site (bottom of the security page in ZMI), a Plone group with the role and added this group to the users I want to have it. The label field is now enabled on the staging folder (the initial clue that you have rights to deploy apparently). You also need to give the group rights in the public_website folder, I gave mine the reviewer role, possibly the member role might be adequate.
[1] I know adding roles is frowned upon, but I'm pretty sure this is the only one I want to add. Plus IMHO deploying is a significantly different action from publishing.