I am having a bit of a problem with the Tabs Module it works fine in a Node with PHP as the Input format.
However, I am using the Drupal 5.X with the Zen theme and would like to use page.tpl.php to output the Primary Links Menu in tabbed format.
The README file for the tabs gave the following code:
$form = array();
$form['example1'] = array(
'#type' => 'tabset',
);
$form['example1']['tab1'] = array(
'#type' => 'tabpage',
'#title' => t('One'),
'#content' => t('First tab content.'),
);
$form['example1']['tab2'] = array(
'#type' => 'tabpage',
'#title' => t('Two'),
'#content' => t('Second tab content.'),
);
$form['example1']['tab3'] = array(
'#type' => 'tabpage',
'#title' => t('Three'),
'#content' => t('Third tab content.'),
);
return tabs_render($form);
...which works fine in a Node with PHP as the Input format. However, I am using the latest Drupal with the Zen theme and would like to use page.tpl.php to output the Primary Links Menu in tabbed format.
page.tpl.php:
Basically, I would like to know the preferred way of doing this. I tried copying the first code segment to the page.tpl.php file but it seems to 'crash' the PHP engine and no output is made after the 'return tabs_render($form)' call...
Comments
Comment #1
nedjoTry
printinstead ofreturn.Comment #2
mjs-1 commentedThanks - tried that
Print doesn't seem to work. It just echoes the text, and not javascript needed.
Comment #3
bcn commentedprint seemed to work ok for me in my node-tpl.php file...
Comment #4
wim leers