If you need to display or do something in your concrete5 theme when the site is in edit mode, use this code:
<?php global $c; if ($c->isEditMode()) { ?> Do something here <?php } ?>
If you need to display or do something in your concrete5 theme when the site is in edit mode, use this code:
<?php global $c; if ($c->isEditMode()) { ?> Do something here <?php } ?>
This didn’t work for me, here is an update function:
editingEnabled()) {
//Do something
}
?>
defunct-
what version of concrete5 are you running?
5.3.2 beta, but my function is also incorrect. That just checks if it can be edited, in which cause will not do the same thing
How to do it without relying on the global variable $c? Is there another way to obtain whatever $c is supposed to be set to?
@BASTA!
Not sure, what exactly are you trying to do?
I wrote a little post on how I setup my theme to adjust backgrounds or anything really while the edit bar is being displayed.
http://defunctlife.com/2010/06/concrete5-edit-bar-is-in-the-way-how-to-adjust-your-theme-in-edit-mode/
defunct, thanks for the link – that’s great!