Question on hook_menu in cvs.
In the process of updating my cas module. Having trouble implementing a non-cachable "suggested" menu item. I've been working with this code and I can't get the non-cached entries to show up in administer menus? Anyone know if this is by design? Am I taking the wrong approach here? Consider the following code snippet: function cas_menu($may_cache) { global $user; $items = array(); if ($may_cache) { $items[] = array( 'path' => 'admin/settings/cas', 'title' => t('cas settings'), 'description' => 'Configure central authentication services', 'callback' => 'drupal_get_form', 'callback arguments' => 'cas_admin_settings', 'access' => user_access('administer cas'), 'type' => MENU_NORMAL_ITEM, ); } else { if ((!$user->uid) || ((arg(0)=='admin') && (arg(1) == 'build') && arg(2) == 'menu')) { drupal_set_message('loading menu array'); $items[] = array( 'path' => 'cas/login', 'title' => t('CAS Login'), 'callback' => 'cas_page', 'access' => TRUE, 'type' => MENU_SUGGESTED_ITEM, ); } } return $items; }
Metzler, David wrote:
In the process of updating my cas module. Having trouble implementing a non-cachable "suggested" menu item.
I've been working with this code and I can't get the non-cached entries to show up in administer menus? Anyone know if this is by design?
Yep, by design. Cheers, Gerhard
participants (2)
-
Gerhard Killesreiter -
Metzler, David