Hey,
I have a working installation profile that does a lot of setting up but so far I've been unable to figure out how to change a menu title in code.
By hand, it's in admin/build/menu-customize/primary-links/edit but in code, no clue and the api docs is not very helpful, nor is google.

So far, the only thing I could come up with was $items['primary-links']['title'] = 'Foo'; but that doesn't work.

When I do it by hand and trace it, it seems to call hook_menu_link_alter but I have no clue with what parameters, etc.

Can anyone point me in the right direction please?

Also, a related matter, how do I hide the Recent Posts menu item? (also from install profile)

Thanks

Comments

himdel’s picture

If I do
db_query("UPDATE {menu_custom} SET title = 'Foo' WHERE menu_name='primary-links'");
before
menu_rebuild();
it kinda changes the title except not everywhere, it's still wrong in the admin menu.
But it shows as Foo in blocks and stuff.

I guess I could change it in the menu_links table but isn't that precisely what menu_rebuild() is supposed to do?

+ this still doesn't help with the hiding Recent posts thing