I'll take a stab at this:
<?php $a = new Area('Area'); if ($a->getTotalBlocksInArea($c) > 0 or $c->isEditMode()) { ?> <div id="area"> <?php $a->display($c); ?> </div> <?php } else { $a->display($c); } ?>
I use this code
but the sidebar has a background... so even if in sidebar there aren't any blocks tha sidebar appears...
<div id="sidebar"> <?php $a = new Area('Sidebar'); $a->setBlockWrapperStart('<div class="box-sidebar">'); $a->setBlockWrapperEnd('</div>'); $a->display($c); ?> </div>
but the sidebar has a background... so even if in sidebar there aren't any blocks tha sidebar appears...
Okay, so it's the wrapper code you want to hide.
Just use the above from Mesuva and wrap your sidebar in it!
Just use the above from Mesuva and wrap your sidebar in it!
Can you write the code...
Thank you
Thank you
<?php $a = new Area('Sidebar'); $a->setBlockWrapperStart('<div class="box-sidebar">'); $a->setBlockWrapperEnd('</div>'); if ($a->getTotalBlocksInArea($c) > 0 or $c->isEditMode()) { ?> <div id="sidebar"> <?php $a->display($c); ?> </div> <?php } ?>
Just edited this, realised I didn't need the else clause.
Thank you!
Can you please explain what you're trying to do? Might help us to help you (: