Check If concrete5 Site Is in Edit Mode
Published on November 13, 2012 by Bo Andersen
Sometimes you may wish to check whether or not your site is currently in edit mode. This can easily be done with the simple code below.
global $c;
if ($c->isEditMode()) {
// Site is in edit mode
} else {
// Site is not in edit mode
}
The global $c gives access to the collection object.
One comment on »Check If concrete5 Site Is in Edit Mode«
Hi,thanks for the snippet.Do you know what event was triggered by the edit button in the admin toolbar and what code does it related to?Thanks