There was an issue about Tab and Accordion history. Accordion part was separated in its own issue. Doing here the same for ui_tab part.

See: https://www.drupal.org/project/quicktabs/issues/1454486 (original issue)
See: https://www.drupal.org/project/quicktabs/issues/2897890 (accordions issue)

Being able to navigate back to a page with the same selected tab is an important feature. Starting from patch #35 here is an adapted patch for 'ui_tab'.

This works fine for us for quicktabs containing blocks and views, with ajax activated.

By the way I saw that (at least for me, maybe this is due to ajax) using direct link to tab (adding ?qt-TABNAME=INDEX to URL) don't works for me. And I supposed that these features may have bad interaction.

As the accordion/tabs/ui_tabs history adds a feature to "click" on a tab at page opening I think that it is also a good place to treat the per-URL tab selection.

I added a second patch (onto the first one) which modifies the previous function to check for URL and "click" onto the corresponding tab if found (and this is prioritary regards to cookie content).

Please check code as JS is not my "native language".
Note that for code simplicity and to prevent interactions with original feature this patch uses a different syntax: add "?quicktabs-NAME=INDEX" (rather than "?qt-NAME=INDEX").

Feedbacks welcome.

Comments

Yannick Perret created an issue. See original summary.

smustgrave’s picture

Status: Active » Closed (outdated)

With D7 EOL approaching in a month I'm starting to triage the D7 side of quicktabs queue.

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