Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
The code in region--content.tpl.php check for empty tabs as follow :
<?php if ($tabs): ?><div class="tabs clearfix"><?php print render($tabs); ?></div><?php endif; ?>
which will always print the tabs div wrapper no matter if tabs is empty or not.
Fixed code :
$tab_rendered = render($tabs);
<?php if (!empty($tab_rendered)): ?><div class="tabs clearfix"><?php print $tab_rendered; ?></div><?php endif; ?>
which will check if the rendered tabs is actually empty or not before rendering the wrapper
Comments
Comment #1
othermachines CreditAttribution: othermachines commentedDuplicate of #1332732: Empty <div> for $tabs
Comment #1.0
othermachines CreditAttribution: othermachines commentedfixed code formatting