[wp-trac] [WordPress Trac] #13976: wp_nav_menu() uses IDs for menu-items preventing re-use on the same page

WordPress Trac wp-trac at lists.automattic.com
Wed Jul 7 04:56:27 UTC 2010


#13976: wp_nav_menu() uses IDs for menu-items preventing re-use on the same page
--------------------------+-------------------------------------------------
 Reporter:  foolsrun      |       Owner:           
     Type:  defect (bug)  |      Status:  new      
 Priority:  normal        |   Milestone:  3.0.1    
Component:  Menus         |     Version:  3.0      
 Severity:  normal        |    Keywords:  has-patch
--------------------------+-------------------------------------------------

Comment(by shidouhikari):

 Trying to make me cleaner.

 Core devs shouldn't suggest what WP users should and shouldn't do. I can
 think it's not common, usual, recommended, etc enough to use the same menu
 more than once per page, but a site may require that feature, therefore I
 can't block a designer from doing it just because I don't need, I don't
 want or I don't like it.

 If I can me it easy (not use blocking ID attribute at all and use only
 class attribute, or even better develop options to allow full
 customization of menus UL, LI, A, etc), why make it hard?

 A use case is Joomla, where the same menu is used on 2 or even 4 places on
 the theme, with different styles. Wordpress just never used many menus
 because we didn't and don't have good menu generators, we barely could
 control pages order, and it's hard for themes to rely on plugins with
 proper menu generators.

 The ideal solution would be having a UI to create a menu with its itens,
 including nested ones, having standard classes to point current page, post
 type, etc and their children, and allow us to set custom classes as we do
 with body_class, post_class, comment_class. Then the function to print the
 menu has a parameter to set its ID.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/13976#comment:10>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list