Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

PageEditing.WorkspaceIsActivated - Is it reliable?

Vote:
 

I am using this property to determine when the page is in the editor preview mode. On some of my templates it works correctly (returning false when the page is being viewed in the editor in preview mode) and on other templates, it returns true regardless of whether the page is in preview mode or not.

Has anybody else seen this?

#74918
Sep 11, 2013 15:22
Vote:
 

Use PageEditing.PageIsInEditMode instead. The workspace functionality is currently not used and that flag has been obsoleted.

#74919
Sep 11, 2013 15:33
Vote:
 

Thanks Linus - The problem with that however is that it returns true regardless of whether preview mode is on or off. I need to know when preview mode is on.

#74920
Sep 11, 2013 15:35
Vote:
 

Hmm, there might have been a change since the release of EPiServer 7 but I'm getting a "public" URL when preview is on which results in the PageInEditMode being false when in preview.

#74922
Sep 11, 2013 15:42
Vote:
 

That is, I'm getting the behavior above with the latest code so there seems to have been a change there with different URL:s for editing and previewing. That's the behavior you will get when we release 7.5. I don't know that there is a reliable way of determining this in the 7.0 release since it seems that we are only turning on/off the overlays client side in 7.0/7.1.

#74925
Sep 11, 2013 15:48
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.