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

Ron Parker sysop at scbbs.com
Fri Feb 15 08:35:18 UTC 2008


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?

If not, what's the correct way?  Would it be the old fashioned way 
(i.e., page arguments' => arg(3))?

Thanks for any assistance.

-ron

-- 
Ron Parker
Software Creations               http://www.scbbs.com
Self-Administration Web Site     http://saw.scbbs.com
SDSS Subscription Mgmt Service   http://sdss.scbbs.com
Central Ave Dance Ensemble       http://www.centralavedance.com
R & B Salsa                      http://www.randbsalsa.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20080215/6363d4fe/attachment.htm 


More information about the development mailing list