Project:Panels Tabs
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (won't fix)

Issue Summary

Basically the tabs look really terrible and and don't render right at all.

I found that the difference is that the links have a ... where as the tabs in themes don't have this.

doing the following in my template.php

<?php
/**
* Return rendered tabset.
*
* @themable
*/
function solar_pay_tabset($element) {
 
$output = '<div id="tabs-'. $element['#tabset_name'] .'"'. drupal_attributes($element['#attributes']) .'>';
 
$output .= '<ul>';
  foreach (
element_children($element) as $key) {
    if (
$element[$key]['#type'] && $element[$key]['#type'] == 'tabpage') {
     
$output .= '<li'. drupal_attributes($element[$key]['#attributes']) .'><a href="#tabs-'. $element['#tabset_name'] .'-'. $element[$key]['#index'] .'"><span class="tab">'. $element[$key]['#title'] .'</span></a></li>';
    }
  }
 
$output .= '</ul>';
 
$output .= $element['#children'];
 
$output .= '</div>';
  return
$output;
}
?>

It would be nice if this would support this in the Zen theme,

Comments

#1

so the only difference is that you create a span around the title link?

#2

Basically. Here is updated version which has the the classes 'tabs primary clear-block' add the the ul which fixed up the line under all the tabs.

I have added this to the template.php but I am sure there is a better solution.

<?php
/**
* Return rendered tabset.
*
* @themable
*/
function theme_name_tabset($element) {
 
$output = '<div id="tabs-'. $element['#tabset_name'] .'"'. drupal_attributes($element['#attributes']) .'>';
 
$output .= '<ul class="tabs primary clear-block">';
  foreach (
element_children($element) as $key) {
    if (
$element[$key]['#type'] && $element[$key]['#type'] == 'tabpage') {
     
$output .= '<li'. drupal_attributes($element[$key]['#attributes']) .'><a href="#tabs-'. $element['#tabset_name'] .'-'. $element[$key]['#index'] .'"><span class="tab">'. $element[$key]['#title'] .'</span></a></li>';
    }
  }
 
$output .= '</ul>';
 
$output .= $element['#children'];
 
$output .= '</div>';
  return
$output;
}
?>

#3

what happens if you remove your custom theming, does the tabs work then?

i suggest you to change your css so you it works without the span.

#4

Title:Tabs broken in Zen theme» Tabs broken in custom theming

Changed title

#5

+1 - I'm seeing this too, but in 5.x-1.5 (also Zen Classic).

#6

I have the same problem in a zen subtheme based on classic. As mentioned the problem is that the theme needs a tag around the link text in order to style correctly. I have manually added the tag with developer tools for firefox and it works perfectly. I am just learning drupal so could anyone suggest a way to get the tag added to the generated output.

I am hesitant to make any kind of changes in template.php that may mess with other menus already cusotmized on the page. This would seem to be a matter of just changing some output in the panels_tabs.js file, but I am hesitant to play around in there.

Thanks

slamMan

#7

Status:active» closed (won't fix)

Marking this as won't fix as this issue has had no comment on for a year and I want to clear up the issue queue. If this issue still persists with the current version, please submit a new issue and I will look at it.