Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This module is golden, but it has one pretty important flaw, at least in the role I would like it to assume(I expect it would be a popular application though). When this module is used for navigation blocks which are consistently displayed throughout a site, it will reset to the default tab on every page load. So, if a user wishes to select another item from the same tab, and its not the default, it will have to be reselected. That's going to leave the user pretty irritated upon much repetition.
Is it possible to prevent the tabs from being reset with every page load?
Thanks for reading.
Comments
Comment #1
bcn CreditAttribution: bcn commented+1 to this request...
Upon a quick glance at the JavaScript (jquery) it looks like the first child is being set active on each page load, which results in the tabs being reset each time. Obviously there are use cases for both scenarios, the question is how difficult it would be to retain some state across page reloads.
In any case, many thanks for your hard work on this module!
Comment #2
thatnewguy CreditAttribution: thatnewguy commentedI looked around to see if any other modules provided the same functionality and the tabbed block module seems to keep your tab selection across page loads.
http://drupal.org/project/tabbed_block
It's a good module that provides similar functionality but lacks the theming that this one has available. So if you don't mind doing your own theming it's a good alternative until the problem is solved with this module.
Comment #3
katbailey CreditAttribution: katbailey commentedHi thatnewguy,
have you actually seen this working? I was curious as to how it was done and checked out the module. It sets cookies which seem to be for this purpose but the tabs are being reset on page load. Does it work for you?
Katherine
Comment #4
thatnewguy CreditAttribution: thatnewguy commentedYup, I have it installed on my test site along with your module. I have noticed that if you change pages very quickly, it will lag a small amount and you can observe the same reset on page load that your module has but then automatically it will select the tab you were on. Without any lag it appears as if it just remains unchanged.
Comment #5
bcn CreditAttribution: bcn commentedHi Katherine,
I also tried the tabbed_block module and while it is setting cookies, I can confirm that (as you stated) the tabs being reset on each page reload. I think it has some JS issues with how the cookie is being set, which kinda takes the wind out of it's sails :(
Would could consider patches which used cookies to remember the active tab's state across page loads. If so, I was thinking it would be nice to be able to disable this feature on a per block basis, as some people might want the blocks to reset on page load..
Your thoughts?
Comment #6
katbailey CreditAttribution: katbailey commentedThis feature is being worked on and will be added soon
Comment #7
Anonymous (not verified) CreditAttribution: Anonymous commentedThis is exactly what I could use but for Drupal 6.X. Is there an update as to progress or any ETA? Thanks!
Comment #8
highvoltage CreditAttribution: highvoltage commentedIs this feature in the works for 6.x?
Comment #9
wayne57 CreditAttribution: wayne57 commentedsorry this is repeated but...Will this be added to version 6.x ?
Comment #10
mmader CreditAttribution: mmader commentedIn the mean time, you can implement a quick and dirty solution that I posted in another thread.
Comment #11
sped2773 CreditAttribution: sped2773 commentedI tried out mmader solution in #10 and this works fine until you turn caching on, at which point it will only every render the page with the tab
that was selected when the page was cached, I guess there needs to be a client side solution where the cookie is read and set on page load.
Anyone got any ideas for this?
Comment #12
tayzlor CreditAttribution: tayzlor commentedhas there been any traction on solving this issue, i'm trying to display a multi-step form inside one of the tabs, and whenever i submit to the next step, the page will reload, and the tab will also reset itself back to the default tab (which is not the one my multi-step form is on) =(.
Edit: there seems to be some work over here on the issue - http://drupal.org/node/354199 , so i've posted in there in the hope the guys will roll-up a patch to solve this problem
Comment #13
katbailey CreditAttribution: katbailey commentedMarking as a duplicate of #354199: Remember last clicked tab