[development] calling node_add from another url
Lluís
enboig at gmail.com
Thu Mar 26 13:20:16 UTC 2009
now it works, thanks.
On Thu, Mar 26, 2009 at 1:41 PM, Michael Prasuhn <mike at mikeyp.net> wrote:
> 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
>
>
>
>
>
>
--
*La vida és com una taronja, que 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.
More information about the development
mailing list