[development] Drupal 6.x hook_menu question regarding use of wildcards

Chris Johnson cxjohnson at gmail.com
Fri Feb 15 09:11:06 UTC 2008


Um, array(3)->nid is not valid PHP syntax.  Is that what you really meant?

On Fri, Feb 15, 2008 at 9:35 AM, Ron Parker <sysop at scbbs.com> wrote:
>
>
> I'm trying to figure out if I can use wildcards in this manner:
>
>  <?php
>    $items['node/agenda/list/%node'] = array(
>      'title callback' => 'node_page_title',
>      'title arguments' => array(3),
>      'page callback' => 'agenda_list',
>      'page arguments' => array(3)->nid,
>      'access callback' => 'user_access',
>      'access arguments' => array('view agenda'),
>      'type' => MENU_CALLBACK
>    );
>  ?>
>  Since array(3) represents node_load(arg(3)), can I use the statement
> array(3)->nid for the node id. Or, for that matter, array(3)->type for the
> node type?


More information about the development mailing list