1

After quite a bit of googling I'm asking here which theme_* function I use to remove a menu item.

I already use theme_menu_link to alter 2 of the menu items in this menu but I want this one to dissapear completely.

Wasn't there a field I could add to the array that would hide it or am I thinking of something else?

  • 2
    hook_menu_link(), your already using it. – Alex Gill Dec 13 '12 at 11:24
  • Yes but what is the field I need to add that will stop the menu item rendering? – J V Dec 13 '12 at 11:35
-2

I think you're looking for:

$element['hidden'] = 1;

Using: http://api.drupal.org/api/drupal/includes%21menu.inc/function/theme_menu_link/7

check that it's the element you want, and set the "hidden" value to 1. I have not tested this.

  • Can you please explain ? – niksmac Dec 14 '12 at 1:54
  • This does not work for me. Setting the value to 1 does not hide the element from my menu – joshmmo Jan 16 '14 at 4:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.