jasteele123

concrete5 Disable javascript in Edit Mode

May 30th, 2012
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.26 KB | None | 0 0
  1. You can also disable certain javascript while in edit mode by wrapping them in a php conditional.
  2.  
  3. <?php
  4. $page = Page::getCurrentPage();
  5. if(!$page->isEditMode()) {
  6. ?>
  7. <script type="text/javascript">$(function() { alert('Not Edit Mode'); });</script>
  8. <?php
  9. }
  10. ?>
Advertisement
Add Comment
Please, Sign In to add comment