[support] D6 Getting hook_menu_alter to fire

Kayode Odeyemi dreyemi at gmail.com
Tue Jun 5 19:14:29 UTC 2012


On Tue, Jun 5, 2012 at 8:08 PM, Steve Edwards <killshot91 at gmail.com> wrote:
> This hook is only fired when the menu router is rebuilt, so if you're just refreshing a page, it won't be invoked.
>
> Steve
>
> On Jun 5, 2012, at 12:04 PM, Jeff Greenberg wrote:
>
>> I'm sure I've done something dumb, but I have the following in a typical custom module, in the .module file, and cannot get it to fire. Yes, I've cleared cache, and no, it's not what I *really* want to do in the hook...I just put the exit there to see it fire, since it wasn't doing anything else I asked it to.
>>
>> /**
>>  * Implements hook_menu_alter()
>>  */
>> function mymodule_menu_alter(&$items) {
>>     exit;
>> }

do this:

function mymodule_menu_alter(&$items) {
  dsm($items); // this will dump $items vars on all pages
}

-- 
Odeyemi 'Kayode O.
http://ng.linkedin.com/in/kayodeodeyemi. t: @charyorde blog:
http://sinati.com/tree/java-cheat-sheet


More information about the support mailing list