When defining tabs in code,
if there someway to define which tab is active by default.

I have a list of the days of the week as tabs, but Mon[being first] is always the default.
I'd like to set it to today by default.

Didn't see anything here
http://drupal.org/node/308633
or
http://drupal.org/node/332895
to indicate you can.

Regards
Alan

CommentFileSizeAuthor
#1 600264.patch905 bytesalanburke

Comments

alanburke’s picture

Category: support » feature
Status: Active » Needs review
StatusFileSize
new905 bytes

Looked through the code.
Doesn't seem currently possible.

Here's a quick patch.
this allows you to set

$tabs['active_tab']

in your $tabs definition,
and it will be the default tab on rendering.

alanburke’s picture

Status: Needs review » Needs work
katbailey’s picture

Status: Needs work » Closed (duplicate)

Hi Alan,
I'm most likely going to be committing this patch from stella very soon: #460092: Default Tab which will give you this option from the UI ;-)

K

alanburke’s picture

Ah excellent - Feature request from an Irish user, already completed by an Irish developer, soon to be committed by the Irish maintainer. :-)
We're taking over!

katbailey’s picture

:-D