How to hide Div if it doesn't have any blocks

Permalink 1 user found helpful
I don't want to print div if it doesn't contain blocks. see attached image for brief details...

Thanks in advance...

Regards,
Rajesh

1 Attachment

 
mesuva replied on at Permalink Best Answer Reply
mesuva
This is what I normally do:
<?php 
$a = new Area('Area Name');   
if ($a->getTotalBlocksInArea($c) > 0 || $c->isEditMode()) {  ?>      
<div class="whatever">
    <?php $a->display($c);  ?>      
</div>
<?php } ?>
psd2concrete5 replied on at Permalink Reply
Hello Mesuva,

It works for me. Thanks a lottttttttttttttt..

Regards,
Rajesh