SaaS CMS has officially launched! Learn more now.

PageEditing.WorkspaceIsActivated - Is it reliable?


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?

Sep 11, 2013 15:22

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

Sep 11, 2013 15:33

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.

Sep 11, 2013 15:35

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.

Sep 11, 2013 15:42

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.

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.