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

skouf’s picture

Hello

Any help regarding this one ? How to check a block is empty and don't display the region.

Thanks !