[development] The new menu system
adrian rossouw
adrian at bryght.com
Thu Sep 28 16:11:26 UTC 2006
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20060928/fe911263/attachment.htm
More information about the development
mailing list