I was trying to print a conditional region, but my code does not seem to work that well. Anyone can pitch in a fix, please?
<?php if (!empty($region['billboard'])): ?>
<aside class="col-xs-0 col-sm-12" role="banner">
<?php
$region = block_get_blocks_by_region('billboard');
print render($region);
?>
</aside>
<?php endif;?>
Just in case someone is looking for this snippet, the code shown below is for inserting a region into a node.tpl.php in Drupal 7.
<?php
$region = block_get_blocks_by_region('billboard');
print render($region);
?>
Check PraveenKumar reply below for a conditional alternative of the same code.
Try this.
Hope this helps you.