getTemplateVars('print_page'); $name = $smarty_tabset[$tabset_index]['name']; $id = null; $active = null; if ($print_page != 'y') { $smarty_tabset_i_tab = count($smarty_tabset[$tabset_index]['tabs']) + 1; if (empty($params['name'])) { $params['name'] = "tab" . $smarty_tabset_i_tab; } if (empty($params['key'])) { $params['key'] = $smarty_tabset_i_tab; } if (empty($name)) { $name = $tabset_index; } $id = $id = "content$name-{$params['key']}"; $active = ($smarty_tabset_i_tab == $cookietab) ? 'active show' : ''; $def = [ 'label' => $params['name'], 'id' => $id, 'active' => $active, ]; $smarty_tabset[$tabset_index]['tabs'][] = $def; } else { // if we print a page then then all tabs would be "not active" so hidden and we would print nothing. // we cannot click something so no js handler involed. thats we use the defaultActive // so get the cookietab as the enabled tab. $active = (isset($params['print']) && $params['print'] == 'y') ? 'active' : ''; } if (isset($params['params']['direction']) && $params['params']['direction'] == 'vertical') { $ret = '
'. $content .'
'; } else { $ret = "
$content
"; } return $ret; } }