i add code to my module but it don't work

$tabs['first'] = array(
  'title' => t('One'),
  'type' => 'view',
  'vid' => 'my_view_id',
  'display' => 'my_display',
  'args' => 'my_arguments',
);
$tabs['second'] = array(
  'title' => t('Two'),
  'type' => 'block',
  'bid' => 'modulename_delta_id', // e.g. user_delta_1
  'hide_title' => TRUE,
);
$tabs['third'] = array(
  'title' => t('Three'),
  'type' => 'node',
  'nid' => 'my_node_id',
  'teaser' => TRUE,
  'hide_title' => TRUE,
);
$tabs['fourth'] = array(
  'title' => t('Four'),
  'type' => 'freetext',
  'text' => 'Hello World',
);

$quicktabs['qtid'] = 'any-unique-id';
$quicktabs['tabs'] = $tabs;
$quicktabs['style'] = 'Excel';
$quicktabs['ajax'] = FALSE;
print theme('quicktabs', $quicktabs);

How we can use quick tab for custom module?

Comments

itqn2004’s picture

ok, i have been test It work now for D7:

$row = t('fdddddddddddddddd dfdffd');
$row2 = t('test test test test');
$options = array('style'=>'Arrows', 'renderer' => 'quicktabs', 'hide_empty_tabs' => 0, 'ajax' => 0);
 $tabs[] = array(
            'title' => t('Tab 1'),
            'contents' => array('#markup' => $row),
          );
 $tabs[] = array(
            'title' => t('Tab 2'),
            'contents' => array('#markup' => $row2),
          );
$tabs[] = array(
            'title' => t('Tab 3'),
            'contents' => array('#markup' => $row),
          );
$quicktabs = quicktabs_build_quicktabs('dsdsdsds', $options, $tabs);

    $output = drupal_render($quicktabs);
	print $output;
	
	
smustgrave’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

With D7 EOL approaching in a month I'm starting to triage the D7 side of quicktabs queue. This doesn't appear to have any code so believe this may not make it, sorry! Thanks though!

If still an issue or needed for 4.0.x (latest branch) feel free to reopen