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

Stalski’s picture

yes, adding the #groupname appended to the url should be fine. At least for verticals.

krembo’s picture

Thanks for quick answer, but I checked this and it doesn't work with horyzontal neither vertical tabs... Maybe something wrong with settings?

bryancasler’s picture

Same problem, subscribe

nils.destoop’s picture

When 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

nils.destoop’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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

joostvdl’s picture

Status: Closed (fixed) » Active

Is there a way with jquery or so to go to a tab without the URL fragment option?

Stalski’s picture

Status: Active » Closed (fixed)

I 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

prinds’s picture

Here's how I did this with jQuery

The jquery string targets the pane that I want to show, not the tab link.

	Drupal.behaviors.showTextTab = 
	{
		attach: function (context, settings)
		{
			$('body.page-node-edit.node-type-item #node_item_form_group_item_data').data('verticalTab').focus();
		}
	}