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.
In the page.tpl.php, the header markup is always printed even if the containing variables are empty is disabled.
In my sub theme, it easy to change this, but it doesn't seem right to have styled, empty divs floating around.
I added this:
<?php if ($logo || !empty($site_name) || !empty($primary_nav) || !empty($secondary_nav) || !empty($page['navigation'])):
?>
Also note that once the header no longer exists the h1 page-headers require their margin back that is removed in overrides.css
.page-header{margin-top:0}
Maybe there is a better way of overriding the CSS here?
Comment | File | Size | Author |
---|---|---|---|
Screenshot 2014-05-06 12.03.47.jpg | 82.25 KB | LewisNyman |
Comments
Comment #1
markhalliwellI'm pretty sure this has already been taken care of in 7.x-3.x-dev. Could you please verify.
Comment #2
markhalliwellNo response.