disable elements in edit mode

Permalink
I'm thinking of using an off-canvas element on my site and I want to be able to edit it. Is this possible?

View Replies:
mediasplash replied on at Permalink Reply
Hi,
You could use specific code when in edit mode to bring the element on screen.
In the code below the 'Search' area is wrapped in a div when 'not' in edit mode.
You would just remove the '!' before 'Page' to have it show in edit mode instead.

<?php if (!Page::getCurrentPage()->isEditMode()): ?>
<div id="popover-content" class="hide">
<?php endif; ?>

<?php
$a = new GlobalArea('Search');
$a->setBlockLimit(1);
$a->display($c);
?>

<?php if (!Page::getCurrentPage()->isEditMode()): ?>
</div>
<?php endif; ?>


Hope this helps.
spWalsh replied on at Permalink Reply
I had a similar project where the block was hidden and became visible if another element was hovered over. This is what I used to make them visible so I could edit them using c5. You simply need to only target the item when it is in edit mode <? if ($c->isEditMode()){ ?> then type the styles you want on the element(s) to reposition them on the screen then close the php if statement <? } ?>
<? if ($c->isEditMode()){ ?>
   <style>
        .hiddenElement {
           display: block !important
        }
   </style>
<? } ?>