Navigation menu order
Changing the order of navigation menu items by programming code doesn't work.
For example in my extension I have a navigation item which I want to show at the top of the search menu. So I give it a weight of -100. (A lower weight means sorting to top, a higher weight sorting to bottom).
_testnav_civix_insert_navigation_menu($menu, 'Search', array(
'label' => E::ts('Test Navigation'),
'name' => 'test_navigation',
'url' => 'civicrm/mypage',
'permission' => 'access CiviCRM',
'operator' => 'OR',
'separator' => 0,
'weight' => -100
));
_testnav_civix_navigationMenu($menu);
}
However the code above does't work.
Additional details
CiviCRM Version 5.36.alpha1 Drupal 8
Edited by jaapjansma