The accepted answer here by marcvangend explains how to it with hook_menu_alter
. His method works, even if you skip step one (the block View).
But just out of interest: Can you do this by means of hook_menu
?
So far, I've tried to put the following in hook_menu
:
$items['node/%node/delete'] = array(
'title' => 'Delete',
'access callback' => TRUE,
'type' => MENU_LOCAL_TASK,
);
However, that did not have any effect.
(Just to make clear, I just want the "Delete" tab, pointing to this existing path node/%node/delete
. I don't want to put a view on it.)