Opened 16 years ago
Closed 16 years ago
#12765 closed defect (bug) (duplicate)
Menu item link classes do not indicate "current" for parent item/s
| Reported by: | youngmicroserf | Owned by: | ryan |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Menus | Version: | 3.0 |
| Severity: | normal | Keywords: | menu item classes current |
| Cc: | Focuses: |
Description
In a hierarchical menu structure, it is often useful to be able to be able to differently style the current page's parent/grandparent/etc. differently from other parents. When testing a multi-level menu with the Twenty-Ten theme, "current-menu-item" is displayed in the selected page's class list, yet there is no attribute to identify the current selection's parent, grandparent.
Not sure if this is a bug or a feature. But I think it would be very useful to add this to the class list.
<div id="menu-menu-1" class="menu-header">
<ul class="menu">
<li id="menu-item-2754" class="menu-item menu-item-type-post_type menu-item-object-page"><a target="_self" href="#">photos</a>
<ul class="sub-menu">
<li id="menu-item-2755" class="menu-item menu-item-type-post_type menu-item-object-page"><a target="_self" href="#">Work Photos</a></li>
<li id="menu-item-2761" class="menu-item menu-item-type-post_type menu-item-object-page current-menu-item"><a target="_self" href="#">Holiday Photos</a></li>
</ul>
</li>
</ul>
</div>
Change History (3)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
OK, I was first ;), but I think this is a duplicate of http://core.trac.wordpress.org/ticket/12812, and there's more input there already...