[development] calling node_add from another url

Michael Prasuhn mike at mikeyp.net
Thu Mar 26 12:41:19 UTC 2009


Try this:

$items['node/%node/proveidors/afegir'] = array(
   'title' => 'Afegir Provïedor', //trans
   'page callback' => 'node_add',
   'page arguments' => array('proveidor'),
   'access arguments' => array('create',0,$user),
   'access callback' => 'proveidors_access',
   'type' => MENU_LOCAL_TASK,
   'file' => 'node.pages.inc',
   'file path' => drupal_get_path('module', 'node'),
);


-Mike

On Mar 26, 2009, at 5:31 AM, Lluís wrote:
> I am creating submenus integrated inside a module using OG, I need
> something like
>
>  $items['node/%node/proveidors/afegir'] = array(
>    'title' => 'Afegir Provïedor', //trans
>    'page callback' => 'node_add',
>    'page arguments' => array('proveidor'),
>    'access arguments' => array('create',0,$user),
>    'access callback' => 'proveidors_access',
>    'type' => MENU_LOCAL_TASK,
>  );
>
> but it don't work because "node_add" is inside a .inc file; a solution
> could be make it an alias of "node/create/proveidor&gid[]%node", where
> %node is the id of the organic group, but I don't know how to do this
> (neither if it is possible).
>
> Any idea?


__________________
Michael Prasuhn
503.488.5433 office
mike at mikeyp.net
http://mikeyp.net







More information about the development mailing list