We do not have any documentation on how to use exported quicktabs.

It seems similar to views exports, but is it the same method?
- there is no hook_quicktabs_api() (as in views) nor hook_ctools_plugin_api('quicktabs', x) (as in boxes)
- can I use mymodule.quicktabs_default.inc file? where can I put it?

As I see other feature requests are coming.. (This issue is for the missing documentation, handbook page)

Comments

pasqualle’s picture

answer: In fact, there is a hook_ctools_plugin_api, so you can put the hook_quicktabs_default_quicktabs implementation into mymodule.quicktabs.inc if you implement the hook_ctools_plugin_api.

example:
mymodule.module

/**
 * Implements hook_ctools_plugin_api().
 */
function mymodule_ctools_plugin_api($module, $api) {
  if ($module == 'quicktabs' && $api == 'quicktabs') {
    return array(
      'version' => '1',
      'path' => drupal_get_path('module', 'mymodule') . '/exports'
    );
  }
}

exports/mymodule.quicktabs.inc

/**
 * Implements hook_quicktabs_default_quicktabs().
 */
function mymodule_quicktabs_default_quicktabs() {
  $items = array();
  ...// the exported quicktabs
  return $items;
}
pasqualle’s picture

I think the api should be called "quicktabs_default" then the file name would be mymodule.quicktabs_default.inc (as expected)..
new issue..

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