Download & Extend

Empty <div> for $tabs

Project:Omega
Version:7.x-3.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

When has no tabs on the page then an empty <div> goes to output. Like this: <div class="tabs clearfix"></div>
Because the $tabs variable in the region--content.tpl.php file is an array. Like this:

Array
(
    [#theme] => menu_local_tasks
    [#primary] =>
    [#secondary] =>
)

This check is not enough:
<?php
if ($tabs) :
?>

This is better:
<?php
if ($tabs && !empty($tabs['#primary']) :
?>

Comments

#1

Agreed. I just spent a good bit of time debugging some extra space in IE7 that ended up being because of this empty $tabs div.

#2

Marked #1385770: Tabs Wrapper printed even if tabs is empty as duplicate of this issue.

#3

Status:active» needs review

Had this issue also some times...

AttachmentSizeStatusTest resultOperations
tab_condition_1332732-4.patch845 bytesIgnored: Check issue status.NoneNone

#4

Assigned to:Anonymous» himerus

ah IE7 how we love you so... :)

#5

Assigned to:himerus» Anonymous
Status:needs review» fixed

Comitted to 7.x-3.x

#6

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.