Web sites and Web pages are always changing over time; CMS sites and pages are no exception. During a CMS page's lifetime, the page may and most probably will be modified many times. Once a new version of the page has been approved, this version is displayed on the live site according to its publishing schedule. CMS doesn't delete the previous approved page version; it is automatically maintained for revision tracking. Any page change that has been approved by an editor is a revision. Each approved change to a page creates a new page version.
Revision tracking is always enabled; page versions are stored by date and time. Page content and properties that have to be approved by the editor are versioned, while page properties that can be changed by a moderator without further editor approval are not versioned. Versioned changes include placeholder content, resource gallery items used on the page, custom properties, and page description. Changes that are not versioned include page name, page display name, publishing schedule, and publishing flags, such as Important Page, Hide When Published, and the two Web Robots flags.
NOTE: Code in the template ASPX file is not stored in the database and is not versioned by revision tracking.
CMS archives all approved pages; there is no configurable maximum number for the length of the revision history. Although page versions are maintained by CMS, there is no rollback facility. If you want to go back to an older version, you need to manually copy and paste content from the older page preview into a new version of your page.
NOTE: It is possible to purge page revisions using the Site Manager; we will discuss how to do it in Chapter 16.
Revision histories are made available to content creators using Web Author console commands that allow them to compare versions. There are two console commands related to revisions:
When viewing and comparing the page revisions, you need to be aware that they are displayed using the current template file. This is especially important if you are looking at a specific revision by date. Even if the template file has been changed since that date, the revision will be displayed using the current template file, not the original template file as it was on that particular date. As a result, the revision may not be displayed as it was displayed originally. For example, if the template file has had a placeholder removed since that date, the page revision will be based on the current template file and will not display this placeholder and its content.
To compare a particular page's revisions using the Web Author, a currently logged-on user must have authoring or editing rights to the page. Selecting the Revision History command on the console displays the Revision History dialog, shown in Figure 6-10, which provides an interface for comparing the revisions.
Two check boxes under Revision Types to List provide the ability to specify the types of revisions you want to display, as follows:
NOTE: Changes to resource gallery items are viewed within the pages that use these items; any approved change to a resource gallery item used in a page creates a new page version.
Depending on the revision types you've specified, the list of revisions that meet the type criteria will be displayed. Different information is listed for the approved page versions versus an unapproved version of the page, as follows:
To compare two versions, select them by clicking the Select box for each of the versions, and then click the Compare button. The changes between two pages are displayed under three comparison tabs (Figure 6-12), as follows:
Figure 6-12. Compare Revisions interface
The Appearance and Source tabs display text changes as color-coded: The text that has been added is in one color, and the text that has been deleted is in a different color with strikethroughs. Changed images in the Appearance tab appear with color borders around them. The default colors are green for additions and red for deletions; you can select other colors from the lists provided for both options.