More in this section
Forums / Suggestions / Version Compare Tool

Version Compare Tool

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
2 posts, 0 answered
  1. Byzza
    Byzza avatar
    89 posts
    Registered:
    09 Jul 2007
    22 Mar 2010
    Link to this post
    It doesn't have to be flash, but if we could get either
    1) a visual way to view 2 versions next to each other.
    or
    2) an html comparison tool to view differences between 2 versions.

    I know this could be a lot to ask, but would be quite handing in being able to approve changes.
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    22 Mar 2010
    Link to this post
    Hi Byzza,

    It depends on whether you are talking about IPage objects or IContent items.

    What you can do:

     Create a button or two buttons. You should use RadWindow to preview to current version and staged version (previous version).

    sample

    previewLink.NavigateUrl = String.Format("javascript:ShowPrevious.PreviewVersion('{0}','{1}')", url, staged.Version.ToString());


    // here you pass the previous version of the item
    // and open it in a new window.
     
    PageHistory.prototype.ShowPrevious = function (url, version)
    {
        var path = this.ApplicationPath + url;
        if (path.indexOf('?') < 0)
        {
            path = path + "?";
        }
        else
        {
            path = path + "&";
        }
        path = path + this.EditModeKey + "=preview&" + this.PageVersionKey + "=" + version;
        previewWin = window.radopen(path, "preview");
     
     
    }


    To get the version of an IStagedPage you could use  GetVersion(int version);
    For content items you should use VersioningBanager and IVersionItem

    IVersionItem ContentOld = versionManager.GetItem(content.ID, Thread.CurrentThread.CurrentUICulture, VarsionNumber)

    You  may find this post useful .

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
2 posts, 0 answered