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.
If you are on home of a theme (e.g. bartik) you can see an empty <div class="tabs"></div>
in the code. This also adds a gab
.tabs {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
margin-bottom: 20px;
}
in page.tpl.php the $tabs
variable always evals to true:
<?php if ($tabs): ?>
<div class="tabs">
<?php print render($tabs); ?>
</div>
<?php endif; ?>
the reason for the TRUE is inside template_preprocess_page(&$variables)
where menu_local_tabs();
is called and always returns an array with 3 keys.
$variables['tabs'] = menu_local_tabs();
Comments
Comment #1
hass CreditAttribution: hass commentedNot only on home. Also in views and other places if the tabs are empty.
Comment #2
droplet CreditAttribution: droplet commentedMany similar issues, some of them get fixed or duplicated or ... closed for some reason:
#1390576: Remove empty HTML tags
#997408: $tabs is always set
Comment #3
sachbearbeiter CreditAttribution: sachbearbeiter commentedas a workaround: