By Daniel_Hatcher on
I have a question i'm making a module only i need to create a navigation. The navigation is like the one in the SEARCH area. The links like Content > Gallery > Users right next to the title.
Only i can't seem to find a tutorial to show me how to do it so i'm asking here in the hopes someone will inform me.
Comments
API
http://api.drupal.org/api/5/function/hook_menu
Nancy W.
Drupal Cookbook (for New Drupallers)
Adding Hidden Design or How To notes in your database
NancyDru
Heres what i have.
Heres what i have.
function tutorial_menu() {
$items[] = array(
'path' => 'tutorial',
'title' => t('Tutorials'),
'callback' => 'tutorial_all',
'access' => user_access('access tutorial content'),
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => '1'
);
$items[] = array(
'path' => 'admin/settings/tutorial',
'title' => t('Tutorial Database Settings'),
'callback' => 'drupal_get_form',
'callback arguments' => 'tutorial_admin',
'access' => user_access('access administration pages'),
'type' => MENU_LOCAL_TASK,
'weight' => '0'
);
$items[] = array(
'path' => 'addtutorial',
'title' => t('Add Tutorial'),
'callback' => 'tutorial_add',
'access' => user_access('access tutorial content'),
'type' => MENU_LOCAL_TASK,
'weight' => '2'
);
$items[] = array(
'path' => 'phptutorial',
'title' => t('PHP Tutorials'),
'callback' => 'tutorial_type',
'access' => user_access('access tutorial content'),
'type' => MENU_LOCAL_TASK,
'weight' => '3'
);
$items[] = array(
'path' => 'javatutorial',
'title' => t('JavaScript Tutorials'),
'access' => user_access('access tutorial content'),
'type' => MENU_LOCAL_TASK,
'weight' => '4'
);
return $items;
}
Problem is it displays like so.
Navigation: Tutorial Database > Tutorial Database(selected) > JavaScript Tutorials > PHP Tutorials > Add Tutorial
But i need it like so.
Navigation: Tutorial Database(selected) > JavaScript Tutorials > PHP Tutorials > Add Tutorial
As you can tell it's displaying Tutorial Database twice when it should only show once.
Here is a good one
Have you seen my tutorial about hook_menu?
http://dmitrig01.blip.tv/file/207037/
[drupal++]
I watched it, but i did not
I watched it, but i did not really see a way to fix my error.