Drupal: Horizontal Menu
-
11-11-2019 - |
Frage
I'm trying to programmatically create the custom horizontal menu for my custom module, but I'm having a lot of trouble.
I want to make a horizontal menu like this :
This is my code so far, but it only displays on the main left vertical sidebar with everything else (this is the pre-packaged Garland theme):
/* 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;
}
Keine korrekte Lösung
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow