Jump to content
Claudia M

Change order in admin menu

Recommended Posts

Hi,

I want to reorder the menu on the admin page - Customers, Inventory, Reporting, File Manager, etc and their sub categories.  What file(s) do I edit? Thanks in advance for any and all help and responses.

Claudia

Share this post


Link to post
Share on other sites

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.

 

Share this post


Link to post
Share on other sites

Thanks Brian,

How would I do this?  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.

Share this post


Link to post
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: [email protected]+
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.

Edited by bsmither

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...