Posted by OkieRazorback on June 14, 2012 at 4:12pm
Hi all, I have created a page with 5 tabs (relevant code below) that takes a customer id as a parameter. I need to show the $items['customer/%'] item in my site's navigation menu but it is not accessible in the menu admin area. I believe it has something to do with the percent sign because, when I remove the it the item is available in the menu admin area. However, I need the percent sign so I can pass in a customer number to the different tabs. How can I get the item available in the menu admin area without removing the percent sign? All help is appreciated. Thanks.
<?php
$items['customer/%'] = array(
'title' => t('Customer Information'),
'title callback' => 'fsp_customer_information_title_callback',
'title arguments' => array(1),
'type' => MENU_NORMAL_ITEM,
'access arguments' => array(
'access fsp_customer_information',
),
'page callback' => 'fsp_customer_information_build_tab_view',
'page arguments' => array(
1,
),
'file path' => drupal_get_path('module', 'fsp_customer_information') . '/includes/',
'file' => 'fsp_customer_information.build_tab_view.inc',
);
$items['customer/%/b2b'] = array(
'title' => t('B2B'),
'type' => MENU_DEFAULT_LOCAL_TASK,
'access arguments' => array(
'access fsp_customer_information',
),
);
$items['customer/%/crm'] = array(
'title' => t('CRM'),
'type' => MENU_LOCAL_TASK,
'access arguments' => array(
'access fsp_customer_information',
),
'page arguments' => array(
1,
2,
),
);
$items['customer/%/edi'] = array(
'title' => t('EDI'),
'type' => MENU_LOCAL_TASK,
'access arguments' => array(
'access fsp_customer_information',
),
'page arguments' => array(
1,
2,
),
);
$items['customer/%/pbs'] = array(
'title' => t('PBS'),
'type' => MENU_LOCAL_TASK,
'access arguments' => array(
'access fsp_customer_information',
),
'page arguments' => array(
1,
2,
),
);
$items['customer/%/shipto'] = array(
'title' => t('SHIPTO'),
'type' => MENU_LOCAL_TASK,
'access arguments' => array(
'access fsp_customer_information',
),
'page arguments' => array(
1,
2,
),
);
$items['customer/%/sales'] = array(
'title' => t('SALES'),
'type' => MENU_LOCAL_TASK,
'access arguments' => array(
'access fsp_customer_information-sales',
),
'page arguments' => array(
1,
2,
),
);
?>