28 Sep
2006
28 Sep
'06
6:11 p.m.
On 28 Sep 2006, at 6:00 PM, Derek Wright wrote:
where [function] is a string describing the action this page will perform, and [id] is either an int (project nid) or string (project name), why should i have to register this as 2 separate menu items (one with a %d and the other with a %s)? they're both going to be identical in every other respect, and unless i'm insane, the callback function for both items will be a single function that just checks "is_numeric(arg(1))" and does the right thing depending on what kind of argument it is.
Yeah. we decided that a page callback could just do if (!is_numeric) { drupal_page_not_found(); } that's completely acceptable imo