[wp-trac] [WordPress Trac] #12765: Menu item link classes do not indicate "current" for parent item/s

WordPress Trac wp-trac at lists.automattic.com
Mon Mar 29 23:13:06 UTC 2010


#12765: Menu item link classes do not indicate "current" for parent item/s
----------------------------+-----------------------------------------------
 Reporter:  youngmicroserf  |       Owner:  ryan                     
     Type:  defect (bug)    |      Status:  new                      
 Priority:  normal          |   Milestone:  Unassigned               
Component:  Menus           |     Version:  3.0                      
 Severity:  normal          |    Keywords:  menu item classes current
----------------------------+-----------------------------------------------
 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>
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/12765>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list