You are here

function theme_tabset in Javascript Tools 5

Return rendered tabset.

@themable

File

tabs/tabs.module, line 141
API for creating tabbed pages.

Code

function theme_tabset($element) {
  $output = '<div id="tabs-' . $element['#tabset_name'] . '"' . drupal_attributes($element['#attributes']) . '>';
  $output .= '<ul class="anchors">';
  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'] . '">' . $element[$key]['#title'] . '</a></li>';
    }
  }
  $output .= '</ul>';
  $output .= $element['#children'];
  $output .= '</div>';
  return $output;
}