How to check if a subarea contains a block?
Permalink Browser Info Environment
Hi There,
I have a custom template where html markup should only appear if a block is in the subarea - what's the best way to accomplish this?
I've been trying stuff like:
or
But these don't seem to work and display twice the subareas when in edit mode.
Any pointers in the right direction would be much appreciated.
Cheers
Ben
I have a custom template where html markup should only appear if a block is in the subarea - what's the best way to accomplish this?
I've been trying stuff like:
<? if(!empty($this->controller->subArea())) : ?> <div class="box-footer"> <?php $this->controller->subArea(); ?> </div> <? endif; ?>
or
<? if($this->controller->subArea() != 0) : ?> <div class="box-footer"> <?php $this->controller->subArea(); ?> </div> <? endif; ?>
But these don't seem to work and display twice the subareas when in edit mode.
Any pointers in the right direction would be much appreciated.
Cheers
Ben
Type: | Discussion |
---|---|
Status: | New |