0
我試圖以編程方式爲我的自定義模塊創建自定義水平菜單,但我遇到了很多麻煩。Drupal:水平菜單
我要讓這樣一個橫向菜單:
這是到目前爲止我的代碼,但它僅顯示與一切主力左豎欄(這是預包裝加蘭主題):
/* hook_menu implementation for my 'lab' custom module */
function lab_menu() {
$items = array();
$items['lab/admin'] = array(
'title' => 'LAB Admin',
'page callback' => 'some_method',
'access arguments' => array('access content'),
'access callback' => 'user_access',
'type' => MENU_NORMAL_ITEM,
);
/* should appear as a 'tabbed' horizontal method */
$items['lab/admin/appoint'] = array(
'title' => 'LAB: Appointment',
'page callback' => 'some_method',
'page arguments' => array(1),
'access callback' => 'node_access',
'access arguments' => array('view', 1),
'type' => MENU_NORMAL_ITEM,
);
$items['lab/admin/reviewers'] = array(
'title' => 'Reviewer\'s Link',
'page callback' => 'some_method',
'page arguments' => array(1),
'access callback' => 'node_access',
'access arguments' => array('view', 1),
'type' => MENU_NORMAL_ITEM,
);
return $items;
}
你想去哪裏這個菜單顯示的組合?您突出顯示的鏈接稱爲MENU_LOCAL_TASK,您可以在用戶帳戶,節點等中看到該鏈接 – Laxman13 2011-03-24 21:02:27