How can I create a new route/menu in Drupal that doesn't automatically render a navigation link?
I'm trying to create a simple page callback in Drupal that doesn't show up in the Navigation menu.
I have a module named helloworld
.
The .module
file contains the following
function _helloword_page_callback()
{
return array('#markup'=>'The quick brown fox says hello, and the lazy dogs thanks you
for following conventions.');
}
function helloworld_menu()
{
$items['helloworld'] = array(
'title' => 'Hello World',
'page callback' => '_helloword_page_callback',
'access arguments' => array('content'),
'type' => MENU_CALLBACK
);
return $items;
}
This successfully exposes a URL on the site of
http://example.drupal.com/helloworld
However, I'm still getting a link in the left hand (Bartik) navigation menu, despite the use of
'type' => MENU_CALLBACK
So, why isn't this working? Am I configuring the Menu item correctly? A more likely question: How am I misinterpreting the use of the menu type constants/system? Are there additional caches to clear that
drush cc all
wouldn't take care of? What other steps can I take to debug this?