So I create a menu item called Sponsorship in administration in the following way:
function eac_sponsorship_menu() {
$items['admin/sponsorship'] = array(
'title' => 'Sponsorship',
'description' => 'This is where all of the child sponnsorship data is stored',
'page callback' => 'system_admin_menu_block_page',
'file path' => drupal_get_path('module', 'system'),
'file' => 'system.admin.inc',
'access callback' => 'user_access',
'access arguments' => array('access sponsorship section'),
'plid' => 1,
'weight' => -500,
'expanded' => TRUE,
);
return $items;
}
If I want to create another menu item directly after this, in the same function, how do I make it a child to this previously defined 'Sponsorship' menu item?
I have seen examples that use a DB lookup to get the plid value. This seems a bit counter intuitive bearing in mind I've only just created the Sponsorship menu item, is there a simple way to do this using the API?
For example
$items['admin/sponsorship/child'] = array(
'plid' => //simple API function to get admin/sponsorship mid?
}
Edit
I think I've just answered my own question...I don't need to define plid, the path of the array $items is enough:
$items['admin/sponsorship/child']
Is this correct?