[development] delete menu not appearing
earnie at users.sourceforge.net
Thu Aug 21 14:00:09 UTC 2008
Quoting Lluís <enboig at gmail.com>:
> I forgot to say I added some "extra menu" to make me easy to customize
> the menus like:
> $items = array('path' => 'comptacau/projectes/'. arg(2) .'/delete',
> 'title' => t('Delete'),
> 'callback' => 'drupal_get_form',
> 'callback arguments' =>
> array('node_delete_confirm', $node),
> 'access' => node_access('delete', $node),
> 'weight' => 1,
> 'type' => MENU_LOCAL_TASK);
> I checked for a concrete "projecte" node type, and going though
> 'comptacau/projectes/_nid_' (my menu) shows "delete" option, but not
> through 'node/_nid_'
> Can this affect menu system in any way? Some node types have this
> custom menus, and some not; but all of the have delete option hidden.
In your module add a MENU_LOCAL_TASK item for 'node/' . arg(2) .
'/delete'. The delete function currently is part of the edit page but
there is no reason you can't added a MENU_LOCAL_TASK for it.
> On Thu, Aug 21, 2008 at 1:23 PM, Lluís <enboig at gmail.com> wrote:
>> I have programed my own premission system; but it shouldn't be the
>> issue here, when de user goes to 'node/2175'
>> appear 'view' and 'edit' not 'delete', but user can go manually to
>> 'node/2175/delete' and delete the node with no problems.
The manual path works because there is a MENU_CALLBACK item for it to
make the Delete button on the edit page work.
Earnie -- http://for-my-kids.com/
More information about the development