Jump to content

Change order in admin menu


Claudia M

Recommended Posts

That would be the admin source file element.navigation.inc.php. Re-order the $nav_sections array to suit. (Pay close attention to the fact that the last element of these arrays do not have a trailing comma. So, if moving the last element to some place not the last, be sure to add a trailing comma.)

There is also a hook at the bottom that can be used to re-assign the $nav_sections array, and by doing the hook thing, your order of elements will be preserved from an upgrade.

 

Link to comment
Share on other sites

In admin, Manage Hooks, Code Snippets tab, click Add Snippet.

The page will reload with a form below the existing snippet list.

Enabled: checked
Unique ID: admin_nav_order@cc600+
Execution Order: 1
Description: Admin Navigation Sections Custom Listing Order
Trigger: admin.navigation
Version: 1.0
Author: https://forums.cubecart.com/topic/54542-change-order-in-admin-menu/
PHP Code:
<?php
/*********
 * arrange the array elements in the order you want them to appear
 *********/
$nav_sections = array(
	'customers'  => $lang['navigation']['nav_customers'],
	'inventory'  => $lang['navigation']['nav_inventory'],
	'reporting'  => $lang['navigation']['nav_reporting'],
	'filemanager' => $lang['navigation']['nav_file_manager'],
	'settings'  => $lang['navigation']['nav_settings'],
	'modules'  => $lang['navigation']['nav_modules'],
	'advanced'  => $lang['navigation']['nav_advanced'],
);

Save and clear CubeCart's internal cache.

This may interfere with the results of other snippets and plugins that want to add Nav Sections to admin.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...