How to know if user is in edit or preview mode?

Vote:
 

How can I find out through code if the current page is viewed by the user in edit or preview mode?

#76506
Oct 28, 2013 8:22
Vote:
 
bool isInEditMode = PageEditing.PageIsInEditMode
#76507
Oct 28, 2013 8:25
Vote:
 

PageEditing.PageIsInEditMode is for CMS7. 

Check out this blog post for a CMS6 solution. http://www.christianengvall.se/check-page-episerver-opened-editadmin-mode/

#76509
Oct 28, 2013 8:29
Vote:
 

Oops. I guess I should read which forum I'm on before replying :-)

#76512
Oct 28, 2013 8:43
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.