You are here: Home / Tools / Website Documentation / Manage Different Versions of Content

Manage Different Versions of Content

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, we show 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.

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, TitleDescription, 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:

 

change_note
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 button for that content item. You can find the hisory buttonright below the title (under view) after the person who created the item, and last modication date.  When you click on the History the following pop up appears.

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.

Propertyshelf MLS Webservices Manage History, Versioning and undoing mistakes

 


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:

Propertyshelf MLS Webservices Manage History and Versioning

 

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

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

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):

Propertyshelf MLS Webservices

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:

Propertyshelf MLS Webservices comparing code differences

 

Note how the position of the text in this view reflects 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:

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:

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

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 ite