I'm trying to create some QuickTabs programmatically like it's documented on the website, but for some reason, my code bellow doesn't generate QuickTabs at all!
What do I do wrong or am I looking at the wrong documentation here?
function quicktabsmenu_block_info() {
$blocks['quicktabsmenu'] = array(
'info' => t('Dynamic QuickTabs menu'),
'cache' => DRUPAL_NO_CACHE,
);
return $blocks;
}
function quicktabsmenu_block_view($delta = '') {
$block = array();
switch ($delta) {
case 'quicktabsmenu':
//set tab content
$block['subject'] = t('Syndicate');
$block['content'] = _create_quicktabs();
return $block;
break;
}
return $block;
}
function _create_quicktabs() {
$tabs['tabcontent'] = array(
'title' => t('Tab 1'),
'type' => 'freetext',
'text' => t('Free text'),
);
$quicktabs['qtid'] = 'my_new_quicktabs';
$quicktabs['tabs'] = $tabs;
$quicktabs['style'] = 'Zen';
$quicktabs['ajax'] = FALSE;;
$var = theme('quicktabs', $quicktabs);
return $var;
}