Revision History Code problem - Front- & Back-End Development - Front- & Back-End Development - Progress Community
 Front- & Back-End Development

Revision History Code problem

  • Revision History Code problem
  • 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.
  • 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
  • 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?