!$c->isEditMode() in 5.7

Permalink 1 user found helpful
The following code doesn't seem o work in 5.7 does anyone have any ideas on how i can achieve this?

<?php
    if(!$c->isEditMode()){ ?>
    <script src="<?php echo $this->getThemePath()?>/assets/js/foundation.js"></script>   
<?php  }?>

TMDesigns
 
WebcentricLtd replied on at Permalink Reply
hello - this still works in 5.7 as far as I can see...

where are you using it?
TMDesigns replied on at Permalink Reply
TMDesigns
in my theme footer.php

basically i dont want the js file to show in edit mode. but it show no matter what code i put in.
WebcentricLtd replied on at Permalink Best Answer Reply
sure - I'm just wondering if the way the footer is included puts it out of scope:

if you use this instead:

if (!Page::getCurrentPage()->isEditMode()) ....
TMDesigns replied on at Permalink Reply
TMDesigns
perfect this is working fine now thanks for you help.