Repro tested with l10n_client:
1. admin/build/translate/import (top level tab "Import" correctly shown as "active")
2. File import is marked "active"
3. Click admin/build/translate/import/package and the "import" tab link loose "active" class
Expected result:
Tab "import" should be kept active while clicking in sub-tabs of the same top level tab.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | drupal6_bug_menu_tabs.png | 12.44 KB | hass |
Comments
Comment #1
hass commentedComment #2
hass commentedComment #3
damien tournoud commentedWell, this doesn't look as a bug. Tabs (menu tasks, in the Drupal language), are active when they are in the menu trail of the current page. On the other hand, links are active when they *directly point* to the current page.
For theming purpose, you can always select
li.active aif you want to theme the link of an active tab differently.Marking as won't fix.
Comment #4
hass commentedWell, this tab2 is in the active menu trail of the top level tab. Therefor a bug
Comment #5
hass commentedComment #6
damien tournoud commentedHum. Maybe I wasn't clear enough, or I do not see your point.
<li>tags (menu tasks, in the Drupal language) are active when they are in the menu trail of the current page;<a>tags (links) are active only when they *directly point* to the current page.In the case you're interested in (the current page is a sub tab, but not the default one), the parent
<li>tag should be active, while its link is not. That's perfectly normal because the parent link does not point to the current page.Is the behavior you're seeing any different from what's described here?
Comment #7
hass commentedAttached a screenshot. Here you see the sub-tab selected and the top level tab looses the active class, what is a bug.
Comment #8
damien tournoud commentedYep, there is obviously a bug with the theme you are using, not with Drupal itself.
Upon testing, none of the default themes have this problem. Please reassign that issue to the theme that has problem, or close that issue.
Comment #9
hass commentedThis is NOT a bug in the theme i'm using. Core does not assign the class to the link.
Comment #10
damien tournoud commentedOf course not, because core assign the
activeclass to a link *only if* the link point to the current page.So this is not a bug. Marked as won't fix.
Comment #11
hass commentedWhatever you think, please keep this case active - it's a bug or a not implemented feature - however you'd like to name it.
A tab item that is a top-level item should be kept active as long as we click thru the sub-items of this top level item. This is how the menu works well and how tabs should work, too.
Comment #12
kylehase commentedhass, I have the same problem. Neither the
linoraelements of a parent menu item include a unique attribute such as "active" with which CSS can identify. The menu item of the current node is tagged as class="active".Here's my html output. The "primary" div includes primary links and the "primary-sub1" are the first sub level of my primary links.
While it may not be a bug per say, it's a useful feature.
Comment #13
pwolanin commentedA fix for this will already be in 6.3: http://drupal.org/node/249571#comment-848993
note that the class that will stick is "active-trail", not "active" since Drupal only uses that for the current page.
Comment #14
hass commentedTHX for the link. Should be a duplicate then...
Comment #15
kylehase commentedGreat!
Comment #16
ddaniel.gomez commentedHi all.
I have a similar problem. I have my navigation menu with links to taxonomy term page.
This pages I themed with views; I add a tabs in order to sort the results.
The question is imposible mantain 'active' the item in menu! Only in the default tab is active. Any ideas? I read thousands of post, and nobody have the same problem?
I try some differents ideas, and nothing to do.
Forgive me, but I need your help.
Thanks! and excuse my english :(
Comment #17
ddaniel.gomez commentedNobody with the same problem?
I think it´s not so strange, to need active the current menu item when you navigate between tabs (it´s the same page!!). True, is not the same uri, but the path is ever the same!
www.sample.com/taxonomy/term/%
www.sample.com/taxonomy/term/%/newest
www.sample.com/taxonomy/term/%/by-author
www.sample.com/taxonomy/term/%/on-sale
Come on, I´m so sad; Nothing to found. I see something about primary & secondary links (like a tabs), but nothing util to mantain the active item in navigation menu.
Thanks in advance.
Comment #18
ddaniel.gomez commentedWell, maybe this is not the site to post this question, sorry, but my english don´t give for more.
Any ideas? any place to explore any solution?
Thanks again.