Is page in edit mode?
I’ve seen a lot of different ways to determine if the actual page is in edit mode. Since i’m a fan of extension methods, i couldn’t resist make my own. This have to be the shortest possible way to determine if page is in edit or not :)
public static bool IsPageInEditMode(this PageData page)
{
return page.WorkPageID != 0;
}
To find out if the page is in edit:
bool x = CurrentPage.IsPageInEditMode()
Comments