The following code demonstrates how to delete the revision history for all pages up to a specified date:
In the code above, you iterate through all the page nodes. By calling the TruncateVersions method of the version manager, you can delete the revision history of a page. You do this by passing a page ID and a date up to which you want to delete the changes. Finally, you save the changes.
The following code sample demonstrates how to delete all but an exact number of revision history changes, for example, keep just the last 10 modifications you made to a page and delete all other changes:
In the code above, you iterate through all the page nodes. By calling the GetItemVersionHistory method of the version manager, you query all the revision history changes for a particular page. Next, you order the queried revision history changes by Version number. During this step, you apply the filtering conditions defining how many revision history changes to skip. When calling the TruncateVersions method of the version manager, you pass the ID of the content item and a Version number. As a result, all revision history changes with version smaller or equal to the specified number are deleted.
Back To Top
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important
Copyright © 2021 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.
Progress, Telerik, Ipswitch, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.
Powered by Progress Sitefinity