Drupal - how to register a MENU_CALLBACK that is accessable to all users(even anonymous ones)?
- by rubayeet
I'm trying to learn Drupal 6. I want to register the path '/topic' to a MENU_CALLBACK using hook_menu(). Here's what I have:
function mymodule_menu() {
$items = array()
$items['foo'] = array(
'page callback' => 'show_page_foo',
'access callback' => 'user_access',
'access arguements' => array('access foo content'),
'type' => MENU_CALLBACK
);
}
function show_page_foo() {
//show foo page
}
This works fine for a logged in user. But when I visit the path as an anonymous user it shows 'Access Denied' message. What must be the 'access callback' and 'access arguments' values to have this accessible to all visitors?
I remember I made this work by simply saying 'access' => TRUE in Drupal 5. No longer works in Drupal 6.