Experimental project

This is a sandbox project, which contains experimental code for developer use only.

Overview

This tab allows you to select a particular tab in a set of quicktabs using code. It provides two options:

quicktabs_select_tab($qt_name, $tab_name)
This will select a tab right away or on the next page refresh. For example, you could put this at the top of a menu callback function to select the tab on that page, or you could put it in a form submit callback to load the tab on the next page.

$qt_name is the machine name of the quicktab set.
$tab_name is either the 0-based index of the tab to select, or it's the name of the tab. Unfortunately, tab names are a bit difficult to determine. For tabs based on blocks, the name will be [module]_delta_[delta]. For others, you'll have to experiment.

quicktabs_select_url_alter($qt_name, $selected, &$url, $options = array())
This will allow you to modify a URL so that a particular tab will be selected on the target page. This uses the standard quicktabs method of adding qt-[$qt_name]=1 to the URL.

You can either pass a string as the $url and an array of options in $options, or you can pass an array to $url, where the first element is the Drupal path and the second element is the array of options. This is a similar format to the $form['redirect'] variable.

Dependencies

quicktabs

Credits

Provided by New Signature

Project information

  • caution Minimally maintained
    Maintainers monitor issues, but fast responses are not guaranteed.
  • caution Maintenance fixes only
    Considered feature-complete by its maintainers.
  • Module categories: Site Structure
  • Created by amarcus on , updated