+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / How to determine if current page is in edit mode?

How to determine if current page is in edit mode?

2 posts, 1 answered
  1. Michael
    Michael avatar
    41 posts
    Registered:
    07 Nov 2013
    12 Nov 2013
    Link to this post
    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
  2. Michael
    Michael avatar
    41 posts
    Registered:
    07 Nov 2013
    12 Nov 2013
    Link to this post
    Just when I decide to post the question...

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

    Ref: http://www.sitefinity.com/blogs/gabesumner/posts/gabe-sumners-blog/2011/08/30/disabling_widget_code_in_sitefinity_rsquo_s_page_edit_mode
    Answered
2 posts, 1 answered