[development] Rename hook_menu ?

Andre Molnar mcsparkerton at yahoo.co.uk
Wed Dec 13 19:08:34 UTC 2006

Karoly Negyesi wrote:
> Today it was raised in #drupal that hook_menu has so little to do with
> menus nowadays that


The menu system deals with all sorts of different - ummm - menus and
menu properties.  Take a look at the constants we have defined.

In the menu system menus aren't really menus is in the cases where they
are callbacks - that don't necessarily have a 'menu' item  - i.e. what
code gets fired off when something requests q=x (but not necessarily
when a user clicks on a 'menu').

But this is more about the 'menu object' - and not about the hook that
generates it.

I've long thought that 'menu object' was misnamed - but as a whole when
looking at the code a great deal of the menu system is really about menus.

What do we do when people ask "how do I get my module to add a menu item
to the navigation menu?" or "how do I create a tabbed menu at the top of
my module's landing page?"
Answer "write code that uses hook_dispatch/control/route"???

Not sure that makes sense.  But for all other reasons I'm for a name
change.  I'm so torn.


More information about the development mailing list