I'm trying to add a new configurations block to admin/config
(just like "People", "Media" and "System").
I tried copying and modifying the relevant lines from modules/user/user.module
but my block doesn't show and directly going to the link admin/config/mysite
results in an access denied message.
The sub pages appear directly under the Administration > Configuration
menu in the Administration module (but not in the page admin/config
.)
Any idea how to fix this?
$items['admin/config/mysite'] = array(
'title' => 'My Site',
'description' => 'Configure My Site settings.',
'position' => 'left',
'weight' => -20,
'page callback' => 'system_admin_menu_block_page',
'access arguments' => array('access administration pages'),
'file' => 'system.admin.inc',
'file path' => drupal_get_path('module', 'system'),
);
$items['admin/config/mysite/page1'] = array(
'title' => 'Sub page 1',
'page callback' => 'drupal_get_form',
'page arguments' => array('mysite_admin_1'),
'access arguments' => array('access administration pages'),
);
$items['admin/config/mysite/page2'] = array(
'title' => 'Sub page 2',
'page callback' => 'drupal_get_form',
'page arguments' => array('mysite_admin_2'),
'access arguments' => array('access administration pages'),
);