I'm using Drupal 6 and I'm trying to display two tab (menus) on a page that has the URL /vehicle_info. Both pages that the tabs link to should take a node's nid as parameter. My current code looks as follows:
$items['vehicle_info/%/basic'] = array( 'title' => t('Basic & Bookings'), 'page arguments' => array(1), 'access callback' => 'user_access', 'access arguments' => array('administer fleet'), 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => 10 ); $items['vehicle_info/%/history'] = array( 'title' => t('Service history'), 'page callback' => 'vehicle_service_history', 'page arguments' => array(1), 'access arguments' => array('administer fleet'), 'type' => MENU_LOCAL_TASK, 'weight' => 20 );
I'm running into 2 issues:
- The tab "Service history" does not open the page "vehicle_service_history" (which is actually a view with the URL vehicle_service_history). It opens a page with the URL "vehicle_info/123/history", which does not exist (123 stands for the current nid).
- The default tab "Basic & Bookings" does not link to the URL "vehicle_info/123" but only to "vehicle_info".
What am I missing?