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 welshartnow on
I'm using Bootstrap 3 framework for my website. I have adapted the page.tpl.php to include a full width jumbotron container:
div class="jumbotron" >
print render($page['content2']);
Within drupal I can add content to block content2 and it shows fine. My issue is that if I don't add content to the content2 block the jumbotron bar still shows. Please see http://create-test.uk , container2 is the green block extending right the way across the screen, I have not added content to it but it still shows?
Comments
Well, if you don't check if
Well, if you don't check if
$page['content2']
is empty .. is Drupal magically supposed to know that $page['content2'] is empty and therefore to not print out the Jumbotron div?I like cookies!
This worked for me in the end
thank you Stefan- this worked for me:
if ($page['mynewregion']):
print render($page['mynewregion']);