« Return to Thread: adding a delete tab on some content types

Re: adding a delete tab on some content types

by Damien Tournoud :: Rate this Message:

Reply to Author | View in Thread

You will need to use 'file path', like this:

 $items['node/%/delete_tab'] = array(
   'title' => t('delete'),
   'page callback' => 'drupal_get_form',
   'page arguments' => array('node_delete_confirm', 1),
   'access callback' => TRUE, // 'node_access',
   'access arguments' => array('delete', 1),
   'file path' => drupal_get_path('module', 'node'),
   'file' => 'node.pages.inc',
   'weight' => 1,
   'type' => MENU_LOCAL_TASK,
 );

Damien Tournoud

On Thu, Jun 11, 2009 at 11:07 AM, Lluís <enboig@...> wrote:
I need to add a "delete" tab for some content types, but I can't
figure out what 'file' should be; if I use "drupal_get_path('module',
'node').'/node.pages.inc'" I get
'sites/all/modules/my_module/node/node.pages.inc'

 $items['node/%/delete_tab'] = array(
   'title' => t('delete'),
   'page callback' => 'drupal_get_form',
   'page arguments' => array('node_delete_confirm', 1),
   'access callback' => TRUE, // 'node_access',
   'access arguments' => array('delete', 1),
   'file' => drupal_get_path('module', 'node').'/node.pages.inc',
   'weight' => 1,
   'type' => MENU_LOCAL_TASK,
 );


--
*La vida és com una taronja, què esperes a exprimir-la?
*Si creus que l'educació és cara, prova la ignorància.
*La vida és com una moneda, la pots gastar en el que vulguis però
només una vegada.
*Abans d'imprimir aquest missatge, pensa en el medi ambient.

 « Return to Thread: adding a delete tab on some content types