[development] The new menu system

karoly at negyesi.net karoly at negyesi.net
Tue Oct 3 16:39:22 UTC 2006


> Have you considered using %s and %d, but considering them equivalent  
> for the lookup process?
> 
> e.g. I could not define node/%s/edit and node/%d/edit, but if I  
> define the second one, the argument gets cast to integer when passed in.

Yes. This is called mask (a callback, defaults to sprintf) and mask arguments (like array('%s/%s/%d') but can be whatever). This will be applied like:

$_GET['q'] = call_user_func_array($mask_callback, array_merge($mask_arguments, explode('/', $_GET['q'])));

It is planned on the second run of the patch or Drumm will have my hide for stuffing too many things in one patch.


More information about the development mailing list