How to determine if current page is in edit mode?

Posted by Community Admin on 04-Aug-2018 22:31

How to determine if current page is in edit mode?

All Replies

Posted by Community Admin on 12-Nov-2013 00:00

Hopefully this is a simple question with a quick answer.

In Sitefinity 3.x, the code looks like:
CmsPageBase page = (CmsPageBase)this.Page;
if (page.PageMode == CmsPageMode.Edit)

I haven't been able to figure out what the code is in 6.x.

Thanks,
Michael

Posted by Community Admin on 12-Nov-2013 00:00

Just when I decide to post the question...

I think I got it.
if (this.Page.IsDesignMode())

Ref: www.sitefinity.com/.../disabling_widget_code_in_sitefinity_rsquo_s_page_edit_mode

This thread is closed