Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By skouf on
Hi
I searched many solutions but can't get it work.
I have 2 bootstrap columns.
One on the left with main content
One on the right with additionnal modules.
If there is no additional modules, I want my column to not be displayed and the left column to be full width
I tried that, but it's not working.
<?php
$width = 4;
if(!empty($page['portfolio_grandes_images'])) {
$width = 12;
}
?>
<div class="col-sm-<?php echo $width; ?>">
<?php print render($page['portfolio_content']); ?>
</div>
<?php if(empty($page['portfolio_grandes_images'])) { ?>
<div class="col-sm-8" id="imagesPortfolio"><?php print render($page['portfolio_grandes_images']); ?></div>
<?php } ?>
Thanks
Comments
Hello
Hello
Any help regarding this one ? How to check a block is empty and don't display the region.
Thanks !