Is there a way to call the active tab on a link to a page. We have a CCK type with 4 tabs and sometimes we want to have the page linked to the content in a specific tab. For example the link would look like this: and when you follow this link you wind up at the product page with the pricing tab open vs the default tab.



nedjo’s picture

Project: CCK Fieldgroup Tabs » Tabs (jQuery UI tabs)

I think support for url linking was part of a previous version of the jquery tabs library but hasn't been revived. I did recently add a relevant method to tabs module (for preselecting the active tab), but I'm not sure we can easily use it here. In any case, any fix shd go into tabs module.

mysurfari.adam’s picture

Using version 1.0 of Tabs(jQuery UI) and CCK Field Group Tabs, I am able to link to an edit page and open a specific tab using the following format: "$nid/edit#tabs-fieldgroup_tabs-N". Where N = the tab number i want opened. Maybe something like this will work for you.... Possibly "".

nedjo’s picture

Status: Active » Fixed

Thanks for the note.

jdblank’s picture

This works for me although the syntax was #tabs-tabset-4

However, it does not work for reloads if you switch tabs once you are on the page. When you reload you go to the default tab or if you had an anchor tag you go to that tab.

apmac’s picture

"I think support for url linking was part of a previous version of the jquery tabs library but hasn't been revived." Is there any intention to revive support for this? Being able to link to a chosen tab would be very useful.

I have tried to revert to Tabs(jQuery UI) version 1.0 to achieve what mysarfari.adam and jdblank achieved but this broke my content type with:
Call to undefined function tabs_pre_render_tabset() in absolutepath\cck_fieldgroup_tabs\cck_fieldgroup_tabs.module on line 135

Any suggestions on how to resolve this issue and make linking to a specified tab work would be greatly appreciated.

GrimSage’s picture


nedjo’s picture

I was referring to a previous version of the jQuery library, not of the Drupal tabs module.

Have you tried adding the jquery cookie library that ships with jquery UI?

apmac’s picture


Thanks for the tip. Enabling jQuery UI module with jQuery UI 1.6 has enabled me to link one tab to another tab using the link format as detailed by jdblank @ #4 but I do have to set the link to open in a new tab. If the link is set to open in the current tab the active tab is reloaded again rather than the tab specified in the link.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

adpo’s picture

I`m using jQuery UI module with jQuery UI 1.6 and the answers @ #4 and #8 are not working for me. ie:[nid]/edit#tabs-tabset-2 is not working for me and.[nid]/edit#group_samplegroup2 either.
That you for reply.

AvalancheOfLlamas’s picture

Status: Closed (fixed) » Active

Agreed with 10. I was linked here from #471152: Linking between tabs in panel node. The maintainer pointed us to here ( Could this possible be of use/incorporated into the module?