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.
Let's say I've created two horizontal tabs("tab1" and "tab2") on user edit page. By default "tab1" is opened and "tab2" collapsed. Could I create an url that will take me to the same page, but open the "tab2" and collapse "tab1" instead of default?
Comments
Comment #1
Stalski CreditAttribution: Stalski commentedyes, adding the #groupname appended to the url should be fine. At least for verticals.
Comment #2
krembo CreditAttribution: krembo commentedThanks for quick answer, but I checked this and it doesn't work with horyzontal neither vertical tabs... Maybe something wrong with settings?
Comment #3
bryancasler CreditAttribution: bryancasler commentedSame problem, subscribe
Comment #4
nils.destoop CreditAttribution: nils.destoop commentedWhen your group has a machine name from: group_mygroup and the group is located on a node, and content type article: then this is your url for the node detail page (full view mode):
http://drupal7/node/3#node_article_full_group_mygroup
This works for me
Comment #5
nils.destoop CreditAttribution: nils.destoop commentedComment #7
joostvdl CreditAttribution: joostvdl commentedIs there a way with jquery or so to go to a tab without the URL fragment option?
Comment #8
Stalski CreditAttribution: Stalski commentedI know a little jquery but my skills are not that fine, but I guess it could be done yes.
If you know the right tricks to set focus on the right element (however I saw that it is kept inside the vertical tabs object). It seems difficult to override the default behavior.
See /misc/vertical-tabs.js line 33
Comment #9
prinds CreditAttribution: prinds commentedHere's how I did this with jQuery
The jquery string targets the pane that I want to show, not the tab link.