Created
April 23, 2011 17:53
-
-
Save dustincurrie/938829 to your computer and use it in GitHub Desktop.
Programmatically create quicktabs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function mymodule_block($op = 'list', $delta = 0, $edit = array()) { | |
switch($op) { | |
case 'list': | |
$blocks['mymodule_quicktabs'] = array('info' => t('[mymodule] Quicktabs')); | |
return $blocks; | |
break; | |
case 'view': | |
switch ($delta) { | |
case 'mymodule_quicktabs': | |
//set tab content | |
$tabs['tabcontent'] = array( | |
'title' => t('Tab 1'), | |
'type' => 'freetext', | |
'text' => t('Free Text'), | |
); | |
$quicktabs['qtid'] = 'mymodule_quicktabs'; | |
$quicktabs['tabs'] = $tabs; | |
$quicktabs['style'] = 'Zen'; | |
$quicktabs['ajax'] = FALSE; | |
$block = array('subject' => '', 'content' => theme('quicktabs', $quicktabs)); | |
return $block; | |
break; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment