I want to remove the link to the homepage from the main menu.

I can delete it with:

menu_link_delete(NULL, "<front>");

But I am worried about needing to undo that at some point in the future, or causing problems when some module expects that link to exist.

It looks like menu_link_save allows marking a menu item as "hidden", but I can't figure out how to get the mlid so that it knows I want to edit an existing menu item.

I have tried calling menu_main_menu, but the result doesn't appear to have a main_menu['<front>'] element.

Any suggestions?


Using the Features module let me export the menu, at which point it was easy to set 'hidden' => '1' on the 'main-menu:' link.

This site is temporarily in read only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .