Overview
Whatever menu you can see in the Front End project or Admin Control Panel can be managed from this section. Menu Management includes add, update, delete of Menu / Submenu, ordering and other related settings.
Clicking on “Menu Management” under Admin Panel Configuration will redirect the user on below screen where all Menu related configurations can be done.
Overview of Menu Configuration
Let’s understand each part of the above screen one by one
- Expand All: This will allow the user to see all the submenu items of each menu at the same time. Refer to below image to see how it looks like:
- Collapse All : This will show only main menu, no sub menu items. This will make the screen look neat and user can expand any menu by clicking individual button on main menu. Here is the screen showing collapsed menu.
- Menu Callback : This is a new feature to be released soon. When you want to show/hide any menu item based on any condition then you can use this feature. Based on the return value of the customized function, it will hide/display the Menu.
- Landing Page : This section allows users to configure landing pages for individual Admin Group for each menu item. Which URL to be called when user clicks of any menu/submenu is configured here.
- Group : There are different group of users on the basis of their roles & responsibilities within the proejct. This can be directly accessed by Admin Control Panel → Users → Group. Below screenshot shows list of Groups.
- Menu : This shows existing Menu available for the user as all the users wont see the same menu.
- PHP Function : If you have special requirement for landing page, you can always fulfil by adding PHP Function and this will get higher priority then direct selection of redirection page. Just remember that return value of PHP function must be URL.
- Group : There are different group of users on the basis of their roles & responsibilities within the proejct. This can be directly accessed by Admin Control Panel → Users → Group. Below screenshot shows list of Groups.
- Change Status : You can change the status of the Parent or Child menu to Active, Inactive or Hidden as shown in below screenshot. Just select the menu item, status and you’re done! Status for Multiple Menu can be changed at the same time using this to save the time.
Let’s understand meaning of each status:- Active: It will display menu at Admin panel.
- Inactive: The menu will reside in the database but it will be neither shown at Admin panel nor in list of Group permission role.
- Hidden: It will not show menu at Admin panel but will show in the list of Group permission role.
- Save Sequence : As all the menu item are equipped with drag & drop feature for ordering. Once user changes the sequence of the menu item, its mandatory to Save the Sequence with “Save Sequence” button otherwise the changes won’t reflect on Admin Control Panel.
- Menu Layout & Column Settings : Toggle button with White thick bars and Green filled circle shows the layout of the Menu. User can choose from Top or Left Menu display. Default is Left Side.
If Top menu is chosen by user, one more setting - Drop down with number of columns gets visible alongside Parent Menu. If number of child menu items are more then you may need to have multiple columns. See below screenshot to get better idea.
- Options available for each Menu item : Parent/Child menu has some settings to quickly perform some actions.
- Add Menu : This option is available for Parent menu only. Using this new child menu can be added.
- Link to Admin Panel : If user wants to see the preview of menu then clicking on this menu will redirect the user on Admin Control Panel.
- Edit : It will open the menu settings in editable mode.
- Delete : This will delete the menu item after confirmation.
- Add new Menu Item : To add new Parent or Child menu, below shown form is used. Here we take glance at each field of the add new menu item form:
- Select Type : Configure.IT allows to add three types of Menu Types as explained below:
- Module : User can add already created Module as menu.
- Dashboard : Existing Dashboard page will be added as menu.
- Custom : Any custom page can be called as menu
- Parent Menu : If you want to add Parent Menu then don’t select anything from the drop down and Parent Menu will be created. If you want to Sub menu then select the parent menu from the drop down and child menu will be created under the Parent Menu.
- Select Module / Select Dashboard / URL : Based on the menu type, the drop down will be auto populated. In case of Custom type, enter the URL.
- Menu Display Name : Write down the display name of the menu to be shown on Admin panel.
- Icon Class : This will facilitate you to choose the unique icon for your menu item from wide range of icons available at CIT library as shown in below screenshot.
- Sequence Order : User can select the sequence / display ordering of the menu in Admin Panel.
- Status : Select the status for menu from Active, Inactive and Hidden
Let’s answer some common questions our users can have for Menu Configurations.
How to create new “PARENT Menu”?
If you want to create “Parent menu”, then you need to follow below listed steps.
- Check above given screenshot.
- Add new menu screen allows you to create parent menu of different types. (Module / Dashboard / Custom). Here, we have created “Parent Menu” of “Module” type.
- If no parent menu is selected then it becomes Parent menu so don’t select any menu from the list.
- Just add menu related information in other fields and you will see “My modules” at 1st position and it will redirect to user module as per the configurations are done in above screen.
- Please note that it doesn’t allow to set label for parent menu. It is mandatory to select any module
- If Parent has child menu available under it, then parent will take 1st child menu module as redirection when clicked on “parent” menu. So take care to select the same module name as parent menu. In above example, it’s “User details” module.
How to add Sub Menu (Type = Module)
As you are aware that three type of Menu type is available, let’s begin with Module Type.
- Same configurations as shown in above Parent Menu will be followed except you need to select Parent Module under which submenu is added.
- Set the Sequence Order and other settings.
- See, this is how it will add sub menu under parent menu.
- This is how it will be reflected in “Menu Navigation Bar” at Admin Panel.
How to add Sub Menu (Type = Dashboard Page)
We have seen how to create dashboard page in “Dashboard Management” section. Now, if you want to add Dashboard Type of submenu then here are the steps:
- Select the Type as “Dashboard”
- Choose Parent Menu to display Dashboard page under
- Select existing dashboard page from the list. All the created dashboard pages will be auto populated after selecting type “Dashboard”.
- Rest all the other steps to be followed as described in “add Parent menu”
- This is how it will look like :
- This is the preview of the Admin panel Menu.
How to add Sub Menu (Type = Custom)
Once you are familiar with Module type Module and Dashboard, let’s move on to Custom.
- Select the type as Custom
- Select Parent Menu
- Write down Custom URL. Here is the URL syntax:
- tools/country/index : it refers Proejct
- admin
- tools
- country (Controller)
- index (Function)
- Rest all the steps to be followed as described in “How to add Parent Menu?”
- See, how it looks like once all types of menu are added.
- Preview of the menu at Admin Panel.