Distinguish between Edit Mode and Preview Mode

Vote:
 

Just like in the title. Is it possible? PageEditing.PageIsInEditMode returns true in both modes.

By Preview Mode I mean this button on the top saying “Toggle preview mode”.

#66549
Mar 04, 2013 17:33
Vote:
 

Hi,

Preview mode is actually edit mode with the minimize editing features and tools around. As far as I know, there is no difference on the server side between the two cases. I would recommend not to have the view rendering and edit rendering so different, to ensure the best live editing user experience. However, if it is really needed, you can use javascript to customize property overlays instead.

#66552
Edited, Mar 04, 2013 20:47
Vote:
 

Maybe this will do the work for you?

EPiServer.Editor.PageEditing.PageIsInEditMode

    

#66553
Mar 04, 2013 21:40
Vote:
 

@Doung Nguyen thanks for clear answer. I know now I should look somewhere else for workaround of my problem.

 

@Johan, that will not help as it gives true in both cases.

#66554
Edited, Mar 04, 2013 22:56
Vote:
 

There's still the possibility to guess the current mode from the url, something similar to this: http://www.christianengvall.se/check-page-episerver-opened-editadmin-mode/

#69594
Mar 28, 2013 18:15
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.