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(

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

Post your comment


  • Stevie Mayhew 28/09/2015 10:06am (2 years ago)

    You can also achieve this via YAML using the GroupedCMSMenu from SilverStripe Australia -

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