I have a function like:
function MYMODULE_menu() {
$items['cars'] = array(
'title' => 'Cars',
'page callback' => 'section_index',
'page arguments' => array("cars"),
'access arguments' => array('access content'),
'file' => 'pages/section.inc',
'type' => MENU_CALLBACK,
);
}
It works fine. Going to cars calls this page. I have a load of node pages like cars/ford and cars/volvo and they get called. However. If you go to cars/volvvvo (for example), it calls the "cars". No 404 is triggered etc.
This also seems to mean that the breadcrumb is glitchy for other pages called by hook_menu which have cars in the path, e.g.
$items['cars/help'] = array(
'title' => 'Cars Help',
'page callback' => 'cars_help',
'access arguments' => array('access content'),
'file' => 'pages/help.inc',
'type' => MENU_CALLBACK,
);
Has a mangled breadcrumb with additional paths to "cars" in it.
Am I missing something? Is there a way to stop additional arguments being just silently pased through via hook_menu?