如何在 Drupal 中创建不会自动呈现导航链接的新路线/菜单?
我正在尝试在 Drupal 中创建一个未显示在导航菜单中的简单页面回调。
我有一个名为helloworld
.
该.module
文件包含以下内容
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;
}
这成功地在网站上公开了一个 URL
http://example.drupal.com/helloworld
但是,尽管使用了
'type' => MENU_CALLBACK
那么,为什么这不起作用?我是否正确配置了菜单项?一个更可能的问题:我如何误解菜单类型常量/系统的使用?是否有额外的缓存来清除它
drush cc all
不会照顾?我可以采取哪些其他步骤来调试它?