[development] Question on Drupal 6 menus
Khalid Baheyeldin
kb at 2bits.com
Fri Jan 4 01:27:37 UTC 2008
This is a question for chx, but I posted it publicly so we all benefit from
his reply.
I found a weird problem with the menus in D6. Most probably I am missing
something
obvious, but I am missing what it is.
This does work. Note that the lists inherits from admin, and it is a NORMAL
item.
function lists_menu() {
$items = array();
$items['admin/lists'] = array(
'title' => t('Mailing lists'),
'page callback' => 'drupal_get_form',
'page arguments' => array('lists_subscribe'),
'access' => user_access('access content'),
'type' => MENU_NORMAL_ITEM,
'file' => 'lists.module',
);
return $items;
}
This, which is what I want, does not show the lists path anywhere, not under
menu
as disabled, nothing (I marked the changed lines with an *).
function lists_menu() {
$items = array();
* $items['lists'] = array(
'title' => t('Mailing lists'),
'page callback' => 'drupal_get_form',
'page arguments' => array('lists_subscribe'),
'access' => user_access('access content'),
* 'type' => MENU_SUGGESTED_ITEM,
'file' => 'lists.module',
);
return $items;
}
The latter is the one needed so that the path can be enabled or disabled in
the
menus as needed. This is the way it works on D5.
What is amiss here?
--
Khalid M. Baheyeldin
2bits.com, Inc.
http://2bits.com
Drupal optimization, development, customization and consulting.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20080103/34d27f8f/attachment-0001.htm
More information about the development
mailing list