Re-ordering the CMS Menu Items

Manually changing the order of the menu items is a little time consuming with all the dev building, place this in your _config.php...

$menuItems = array(
	'CMSPagesController',
	'AssetAdmin',
	'CMSSettingsController',
	'MyAdmin',
	'SecurityAdmin',
);

foreach(array_combine($menuItems, range(count($menuItems), 1)) as $class => $menuPriority)
	$config->update($class, 'menu_priority', $menuPriority);
Rate this post

Post your comment

Comments

  • Stevie Mayhew 28/09/2015 10:06am (1 year ago)

    You can also achieve this via YAML using the GroupedCMSMenu from SilverStripe Australia - github.com/silverstripe-australia/silverstripe-grouped-cms-menu

RSS feed for comments on this page | RSS feed for all comments