Hello,
I was wondering how I can modify the code to Nodereferrer Create to remove the tab item which says "Nodereferrer Create" next to edit, view, etc. The reason is that I am using my own custom link to create a new nodereferrer and I don't need that menu item. I don't want to simply replace the text with "" so that a user could possibly still find the link with their mouse - I'd just like to remove it altogether from the menu but still allow a nodereferrer to be created.

Disabling "Show menu items for nodereferrer fields" makes my custom link stop working (access denied message).
Putting empty text in "Local task label for creating new content" doesn't seem to remove the text "Nodereferrer Create" and I would guess would leave a tiny link the user could still find if they moused around enough.

If I could just comment out some code where this tab is put in with the other tabs, I would really appreciate knowing which line(s) of which file it is on.

Thank you!

Comments

farald’s picture

I think you could do this by setting the menu item to hidden.
Either override it in the module, or hide it using the theme template.

I have this in my template, to add a class to a tab:

function newswire_menu_item_link($link){
  if (empty($link['localized_options'])) {
    $link['localized_options'] = array();
  };
  //Only add the redtab class if this is the Warnings tab
  if($link['title'] =='Warnings' ){
    $link['localized_options']['attributes']['class'] .= ' redtab';
  };

i believe your task can be done in the same way somehow.
maybe just by adding a display:none; to the class.