Generally when there is only one tab, prefer to follow Drupal convention to hide the tab.
Possible use case is when other tabs are not accessible due to permission or various reason.

Comments

ckng’s picture

Status: Active » Needs review
StatusFileSize
new1.46 KB

Attached patch check if the number of tab is only one, do not render the tab.

ckng’s picture

StatusFileSize
new1.47 KB

Bad patch, retry.

cha0s’s picture

Status: Needs review » Fixed

I rolled this patch in, as well as writing code to handle this for accordions too. Thanks for the help!

  • cha0s committed 0779cfa on 7.x-1.x
    Issue #2368669 by ckng: Hide tab when there is only one tab
    

Status: Fixed » Closed (fixed)

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

kmajzlik’s picture

Please re-open this issue to make this optionable. I will provide patch. Maybe it is "tabs" like behaviour but is in oposite with field_group module and its horizontal tabs.

kmajzlik’s picture

And here is quick solution if someone search it:


/**
 * Implements template_preprocess_bootstrap_fieldgroup_nav().
 * Do not hide tabs for single item
 */
function TEMPLATE_preprocess_bootstrap_fieldgroup_nav(&$vars) {
  $vars['is_single'] = FALSE;
}