[development] delete menu not appearing
enboig at gmail.com
Thu Aug 21 14:27:16 UTC 2008
My fault, I was confused after working so long with my own modules; I
didn't remember by default drupal just allow to delete nodes from the
"edit" page; I thought there used to be a "delete" option when viewing
the node. I added this option because while developing it is easier to
delete test nodes.
Thanks to everybody.
On Thu, Aug 21, 2008 at 4:00 PM, Earnie Boyd
<earnie at users.sourceforge.net> wrote:
> 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/
> -- http://give-me-an-offer.com/
*La vida és com una moneda, la pots gastar en el que vulguis però
només una vegada.
*La felicitat ha de ser compatible, compartible i cooperativa.
*Envellim quan els records superen les il·lusions.
*Als llocs desconeguts només s'hi arriba per camins desconeguts.
*Abans d'imprimir aquest missatge, pensa en el medi ambient.
More information about the development