[development] adding a delete tab on some content types

Damien Tournoud damz at prealable.org
Thu Jun 11 09:13:25 UTC 2009


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 at gmail.com> 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.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.drupal.org/pipermail/development/attachments/20090611/3134131e/attachment-0001.htm>


More information about the development mailing list