Revision History Code problem

Posted by Community Admin on 04-Aug-2018 04:47

Revision History Code problem

All Replies

Posted by Community Admin on 08-Dec-2011 00:00

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.

Posted by Community Admin on 12-Dec-2011 00:00

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

Posted by Community Admin on 29-Sep-2015 00:00

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?

This thread is closed