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.
Implementing the HTML5 History API would be a great leap forward for this module. The case was recently put for it to be supported by Views here:
http://drupal.org/node/1084336
Would it be possible to implement this into Quick Tabs?
Comment | File | Size | Author |
---|---|---|---|
#8 | historyforaccordion-1092616.patch | 4.34 KB | acouch |
#6 | historyforui-1092616.patch | 6.01 KB | acouch |
Comments
Comment #1
acouch CreditAttribution: acouch commentedI would really like this feature and would work on a patch if the maintainer would like to see one.
Comment #2
katbailey CreditAttribution: katbailey commentedI would LOVE to see a patch for this :-)
Comment #3
sammyd56 CreditAttribution: sammyd56 commentedGlad to see this getting some eyes! Gogo Drupal developers, you rock :)
Comment #4
acouch CreditAttribution: acouch commented@katbailey, I did a little more looking into this.
Just to be clear the desired behavior is to have a hash in the url appear when you click on a tab and for that to be an entry in the window.history object, correct? So when someone clicks on a tabs and clicks the back button they cycle back through the tabs they have clicked.
If so, the JQuery BBQ plugin in D7 core might be the best route since it does graceful degradation better and already has documentation for use with UI tabs: http://benalman.com/code/projects/jquery-bbq/examples/fragment-jquery-ui...
Does that make sense? If so I'll get cracking.
Comment #5
katbailey CreditAttribution: katbailey commentedUh oh, just realized I never responded here, sorry about that. Yes, that makes perfect sense - I'd really like to see the solution use the bbq plugin.
Comment #6
acouch CreditAttribution: acouch commentedI was able to get around to this. I was only able to get to the UI tabs plugin. I would be able to do the accordion version as well, maybe next weekend.
I tested this with multiple tabs on the same page and it works for me. It also still respects the default active tab selected in the quicktab settings. This will be overridden once someone clicks a tab with history enabled and returns to that page with the hash still in the URL.
Comment #7
tim.plunkettsubscribe
Comment #8
acouch CreditAttribution: acouch commentedAttached is a patch for the accordion. I'll wait for some feedback before delving into the quicktabs renderer.
Comment #9
iamEAP CreditAttribution: iamEAP commentedAny chance anyone would take on a 6 version of this as well?
Comment #10
acouch CreditAttribution: acouch commentedI will work on a 6.x version if the 7.x version is approved.
Comment #11
katbailey CreditAttribution: katbailey commentedSorry for taking so long with this and thanks @acouch for the awesome work! Both patches have been committed :-)
Leaving as "needs work" in case you do find time to implement this for the classic Quicktabs renderer, though I imagine that will be a bit trickier :-/
Comment #12
katbailey CreditAttribution: katbailey commentedFYI I am working on implementing this for the classic Quicktabs renderer.
Comment #13
katbailey CreditAttribution: katbailey commentedOops, didn't mean to change the status.
Comment #14
joelpittet