Hi,

I'm just curious, not necessarily asking for help.

I've got the below code:

<?php
function tcmb_menu() {
 
$items['admin/config/system/tcmb-settings'] = array(
   
'title' => 'Tcmb General Settings',
   
'description' => 'Configure Tcmb module',
   
'page callback' => 'drupal_get_form',
   
'page arguments' => array('tcmb_currency_settings_form'),
   
'access callback' => 'user_access',
   
'access arguments' => array('administer Tcmb'),
  );
 
$items['admin/config/system/tcmb-settings/currency'] = array(
   
'title' => 'Currency settings',
   
'description' => 'Currency',
   
'page callback' => 'drupal_get_form',
   
'page arguments' => array('tcmb_currency_settings_form'),
   
'access callback' => 'user_access',
   
'access arguments' => array('administer Tcmb'),
   
'type' => MENU_DEFAULT_LOCAL_TASK,
  );
 
$items['admin/config/system/tcmb-settings/gold'] = array(
   
'title' => 'Gold settings',
   
'description' => 'Configure gold settings.',
   
'page callback' => 'drupal_get_form',
   
'page arguments' => array('tcmb_gold_settings_form'),
   
'access callback' => 'user_access',
   
'access arguments' => array('administer Tcmb'),
   
'type' => MENU_LOCAL_TASK,
  );
 
$items['admin/config/system/tcmb-settings/other-settings'] = array(
   
'title' => 'Other settings',
   
'description' => 'Configure other settings.',
   
'page callback' => 'drupal_get_form',
   
'page arguments' => array('tcmb_other_settings_form_currency'),
   
'access callback' => 'user_access',
   
'access arguments' => array('administer Tcmb'),
   
'type' => MENU_LOCAL_TASK,
  );
 
$items['admin/config/system/tcmb-settings/other-settings/currency'] = array(
   
'title' => 'Currency Settings',
   
'description' => 'Configure other settings.',
   
'page callback' => 'drupal_get_form',
   
'page arguments' => array('tcmb_other_settings_form_currency'),
   
'access callback' => 'user_access',
   
'access arguments' => array('administer Tcmb'),
   
'type' => MENU_DEFAULT_LOCAL_TASK,
  );
 
$items['admin/config/system/tcmb-settings/other-settings/gold'] = array(
   
'title' => 'Gold Settings',
   
'description' => 'Configure other settings.',
   
'page callback' => 'drupal_get_form',
   
'page arguments' => array('tcmb_other_settings_form_gold'),
   
'access callback' => 'user_access',
   
'access arguments' => array('administer Tcmb'),
   
'type' => MENU_LOCAL_TASK,
  );
  return
$items;
}
?>

I've got two questions here.

1- Why is the array $items['admin/config/system/tcmb-settings/gold'] being rendered at the very end? This didn't happen in Drupal 7. I was looking at weight, which said 'Items with the same weight (which is 0 here because I didn't give any) are ordered alphabetically', which is not the case here because the item starting with O comes before G.
2- Did something change in hook_menu()?

Regards,

Comments

I ended up giving weight.

I ended up giving weight. Thanks anyway.

K.

K.