More in this section
Forums / Developing with Sitefinity / Revision History Code problem

Revision History Code problem

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.
3 posts, 0 answered
  1. Steve
    Steve avatar
    3037 posts
    03 Dec 2008
    08 Dec 2011
    Link to this post
    This code is throwing null in the page revision viewer...


    Is there an "Is" check I can do for the viewer?  Or just run all controls through the revision system to see if they die.
  2. Svetoslav Petsov
    Svetoslav Petsov avatar
    456 posts
    24 Sep 2012
    12 Dec 2011
    Link to this post
    Hi Steve,

     Here's what you can do to check if you are previewing a version node:

    if ( HttpContext.Current.Items["versionpreview"] != null && (bool)HttpContext.Current.Items["versionpreview"] != true)
                    var node = SiteMapBase.GetActualCurrentNode();

    Svetoslav Petsov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    18 Jul 2012
    29 Sep 2015 in reply to Svetoslav Petsov
    Link to this post
    this check is helpful to prevent the call to GetActualCurrentNode() returning null, but is there a way to actually determine the current pagenode from the version manager preview?
3 posts, 0 answered