[wp-hackers] wp_nav_menu too simplistic?

Cornelius, Gregory gcorne at bu.edu
Tue Apr 6 22:18:08 UTC 2010


Unfortunately, I have not had enough bandwidth to participate in the  
multitude of changes in 3.0.   Disclaimer aside, I think there was a  
missed opportunity.   Correct me if I am wrong, but the menu tool  
doesn't modify menu_order in wp_posts or provide a way to order  
categories.  And, adding the ability to insert a chunk of the tree  
sidesteps the issue.
Order can be used for more than just menus.

The new approach also requires themes to replace wp_list_pages() a  
common function call in themes.


On Apr 6, 2010, at 5:32 PM, "Otto" <otto at ottodestruct.com> wrote:

> On Tue, Apr 6, 2010 at 4:22 PM, John Bloch  
> <jbloch at olympianetworks.com> wrote:
>> @Otto: Fair enough. I agree that it should have been built  
>> differently to
>> begin with. But I think extending the walker class is an acceptable  
>> amount
>> of work for the desired effect, given that's how it *has* been built.
>>
>> What exactly can't you modify by extending the walker and putting  
>> your own
>> hooks in?
>
> You can't make two separate, independent, plugins that both create new
> types of menu items without mutual collaboration. Plugins should be
> easily compatible with each other by the very nature of the core
> design.
>
> I have no problem with a feature left out of the core, because I can
> write plugins to add that feature easily enough. But if somebody else
> wants to do the same and we step on each other, then it makes things
> very annoying for our users.
>
> On Tue, Apr 6, 2010 at 4:24 PM, Andrew Nacin <wp at andrewnacin.com>  
> wrote:
>>>> 2. The ability to say "I want all children X levels deep included  
>>>> as menu
>>>> item children of this page/category", i.e. dynamic child handling.
>>>
>>> Yes, this is the only thing I'm interested in, and the lack of it
>>> makes the new menu system basically useless to me. I'm stuck
>>> hardcoding my menus instead. Very disappointing, as the feature does
>>> have promise.
>>
>> It could be handled simply as an option of any menu item. Then the  
>> walker
>> would need to know to fetch children X deep when it sees that  
>> option. Again,
>> at the end of the day, someone needs to go code it.
>
> Still seems very limiting. What if I want to have the menu item fetch
> something entirely different, maybe display post links or something?
> Or items from an RSS feed? Think wider, menu items don't have to be a
> link to a URL only.
>
> The whole thing is just very hardcoded and I'm unhappy about that
> general design. I do grant you that it's still being worked on, and
> yes, maybe it will improve.
>
> My ideal would be basically just like the widgets. I could do class
> My_Menu_Item extends Menu_Item_Widget, then define the configuration
> page and its params and then have an output() function to output the
> menu item from those params. Simple.
>
> -Otto
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers



More information about the wp-hackers mailing list