Safely Manage Different Versions of Content with Plone

Exclusive offer: get 50% off this eBook here
Practical Plone 3: A Beginner's Guide to Building Powerful Websites

Practical Plone 3: A Beginner's Guide to Building Powerful Websites — Save 50%

A beginner’s practical guide to building Plone websites through graphical interface

$29.99    $15.00
by Darci Hanning | February 2009 | Content Management Open Source Web Development

Essential capabilities of content management are the abilities to view the 'change history' of a content item, to compare various versions with one another, and optionally, to revert to a previous version of a content item.

In this article, Darci Hanning discusses how to use versioning in Plone to examine the history of changes made to a content item, to preview and compare versions, and to revert to a previous version of a content item.

(For more resources on Plone, see here.)

Introducing versioning

Now that you have learned how to add various types of content, from pages to events to news items, we're ready to introduce a feature of Plone called versioning, which is an important part of content management. The content items you work with in your Plone site may go through many changes over time. Plone provides versioning information to help you manage your content from the time it was initially created through to the current version.

By default, Plone provides versioning for the following content types:

  • Pages
  • News Items
  • Events
  • Links

Other content types can be configured to provide versioning through the Plone Control Panel under Types.

Although you may enable the File type to use versioning, the only changes that are tracked are those items actually describing the File (for example, Title, Description, and so on). The changes to the contents of the File are not tracked.

Creating a new version

Versions are created each time you save your content. Note that there is a Change note field at the bottom of the Edit page for content items with versioning enabled:

Practical Plone 3: A Beginner's Guide to Building Powerful Websites

The information entered in the Change note field will be stored along with other versioning information, which you are able to view through the History tab.

Viewing the version history

You can view the list of all of the versions of a content item by clicking on the History tab for that content item. In the History view that you can see in the following screenshot, the most recent version is listed fi rst. Clicking on any of the column headers will re-sort the listing based on that column heading.

Practical Plone 3: A Beginner's Guide to Building Powerful Websites

The most current version is always labeled Working Copy in the History view.

Previewing previous versions

To preview a specific version, simply click the preview link of the desired revision. In the following example, revision 3 has been identified, and will be displayed if this link is clicked:

Practical Plone 3: A Beginner's Guide to Building Powerful Websites

On the subsequent page, you may either click on the jump down link to the point of the content preview:

Practical Plone 3: A Beginner's Guide to Building Powerful Websites

or you may scroll down the page in order to see the actual preview:

Practical Plone 3: A Beginner's Guide to Building Powerful Websites

Practical Plone 3: A Beginner's Guide to Building Powerful Websites A beginner’s practical guide to building Plone websites through graphical interface
Published: February 2009
eBook Price: $29.99
Book Price: $49.99
See more
Select your format and quantity:

(For more resources on Plone, see here.)

Comparing versions

From the History view, you can compare any version with the previous version by using the Compare to the previous revision link in the Actions column. You can also compare any previous version with the current version by using the Compare to current revision link.

In the following example, the previous version of the page (revision 7) is being compared to the current version of the page (revision 8):

Practical Plone 3: A Beginner's Guide to Building Powerful Websites

This comparison view will color-code the following types of changes between versions:

  • Content added
  • Content deleted
  • HTML tags added
  • HTML tags deleted
  • Content changes

In the above example, the first paragraph (highlighted in the left column) was actually moved farther down the page (highlighted in the right column). Note how changes to HTML tags are indicated by the colored labels delete and insert.

If you are familiar with HTML, the Show code differences link provides an alternative view of the changes. The following is a screenshot of the code (or HTML) differences view, comparing the two revisions after clicking on the Show code differences link:

Practical Plone 3: A Beginner's Guide to Building Powerful Websites

Note how the position of the text in this view refl ects the actual location of where the text was in revision 7 (left column), and where the text is currently located in revision 8 (right column).

Reverting to a previous version

One of the most useful aspects of versioning is the ability to revert to a previous version. After using the preview links to verify that you have found the version you want to make the new current version, simply click on that version's Revert to this revision link:

Practical Plone 3: A Beginner's Guide to Building Powerful Websites

Clicking on the Revert to this revision link for Revision 8 will create a new version of the content item. This new version will be identical to Revision 8:

Practical Plone 3: A Beginner's Guide to Building Powerful Websites

You will also notice that there is now a new revision in the History:

Practical Plone 3: A Beginner's Guide to Building Powerful Websites

The Comment column is automatically updated to indicate that the most recent version was created from reverting to Revision 8.

Summary

In this article, we have seen what a powerful tool versioning is, for managing each saved version of a content item. In particular, we learned:

  • Which types of content item have versioning enabled by default
  • How to view all of the prior versions of a particular content item
  • How to preview a specific revision or version of a content item
  • How to compare two versions of a content item
  • How to revert to a previous version of a content item

Further resources on this subject:


Practical Plone 3: A Beginner's Guide to Building Powerful Websites A beginner’s practical guide to building Plone websites through graphical interface
Published: February 2009
eBook Price: $29.99
Book Price: $49.99
See more
Select your format and quantity:

About the Author :


Darci Hanning

Darci Hanning has a BSEE from Washington State University (Pullman) and received her MLIS from the University of Washington. She brings over 15 years of experience in software and web application development to her position as the Technology Development Consultant at the Oregon State Library. For the past three years, she has been using Plone, an Open source Software Content Management System, to create and deploy dynamic, easy-to-maintain web sites for small libraries in Oregon. Since Spring 2006, she has been providing technical leadership for the Plinkit Collaborative, a multi-state co-operative, to deploy Plinkit in Colorado, Illinois, and Texas. She has given presentations on both Plone and Plinkit at national and international conferences, has recently served as the President of the Plone Foundation Board, and was selected as a "2008 Mover and Shaker" by Library Journal.

Books From Packt

 

Professional Plone Development
Professional Plone Development

Learning Ext JS
Learning Ext JS

AJAX and PHP: Building Responsive Web Applications
AJAX and PHP: Building Responsive Web Applications

Joomla! Web Security
Building Powerful and Robust Websites with Drupal 6

PHP 5 CMS Framework Development
PHP 5 CMS Framework Development

Drupal 6 Themes
Drupal 6 Themes

Building Websites with Joomla! 1.5
Building Websites with Joomla! 1.5

Expert Python Programming
Expert Python Programming

 

No votes yet

Post new comment

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
8
1
M
n
y
h
Enter the code without spaces and pay attention to upper/lower case.
Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Resources
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software