Drupal | how to hide a locked menu item

I'm not sure why there are such things as locked menu items in Drupal 5 in the first place, but there are. And we'll have to deal with them.

My most recent head scratcher: how to hide a locked menu item, like "my account" when you have no way of editing it? The workaround proved to be diabolically clever in all its simplicity:

  • create a new menu (dummy in my case)
  • create a new menu item under dummy and point it to the locked item's url (user in my case)

Result: the item is automatically moved from navigation to dummy and since nobody has access to the new menu by default, dummy is not shown.

Though this hack is quite straightforward, it shouldn't be necessary in an Uberflexible framework like Drupal.

Comments