+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Revision History Code problem

Revision History Code problem

3 posts, 0 answered
  1. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    08 Dec 2011
    Link to this post
    This code is throwing null in the page revision viewer...

    SiteMapBase.GetActualCurrentNode()

    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
    Registered:
    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();
                }

    Regards,
    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
    Registered:
    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