By stewie32 on
I am using the Quicktabs module, and want to change the default tab that loads based on their selection from a menu which carries them to a page with a Quicktabs block on it. Is it possible to do this using Quicktabs and how exactly can I achieve this.
Comments
set tab on page load
stewie32 did you find out how to do this? I'm trying to do the same. I'm running Drupal 5. THanks
Unfortunately jpdaut I never
Unfortunately jpdaut I never found out how to do this. I had to try another approach. Did you however find a solution I would still like to know how to achieve this
Couple solutions
Here's instructions how you can render quicktabs with custom default tab. Depending on what you mean by menu and how you carry them to the new page, you have to figure out yourself how you pass the tab id.
The _quicktabs_get_active_tab function examines the URL parameters, i.e. the $_GET array. Here's a quick fix to render the tabs with the second tab selected
Another way is to modify the quicktabs_render function's way of determining the active tab in quicktabs.module. Remove the line
and add a function argument $active_tab
Then you can render it with
I didn't test the latter method.
I used Quicktabs version 2.0-rc3.
How to get selected tab on page load?
Hi apaatsio
I have a quicktab with 2 tabs in it. Each tab contains user defined menu block in it. Lets say tab1 contains menublock1 and tab2 contains menublock2 under it. tab1 is the default tab. This quicktab is shown on all the pages.
The problem is when I select tab2 and clicks on menuitem under it, After page load it shows tab1 as selected. I need tab2 to be selected as I selected menuitem under tab2.
Is this possible, Please let me know how to achieve it. I am using quicktabs 6.x-2.0-rc4
Thanks
New version of quick tab
New version of quick tab supports parameter qt-"name of the quick tab instance"=tab number as a parameter in Get request for active tab