The following code use to display all the menu items in drupal
In user.module file
In user.module file
function user_menu() {In system.admin.inc file
$items['admin/user'] = array(
'title' => 'User management',
'description' => "Manage your site's users, groups and access to site features.",
'position' => 'left',
'page callback' => 'system_admin_menu_block_page',
'access arguments' => array('access administration pages'),
'file' => 'system.admin.inc',
'file path' => drupal_get_path('module', 'system'),
'weight' => 3,
);
}
function system_admin_menu_block_page() {The same module we display our custom module menus
$item = menu_get_item();
if ($content = system_admin_menu_block($item)) {
$output = theme('admin_block_content', $content);
}
else {
$output = t('You do not have any administrative items.');
}
return $output;
}
0 comments:
Post a Comment