User Tools

Site Tools


wmanager:dummy_helper_menu

Menu Helper

What are we talking about

In WManager we have created a Codeigniter helper to dynamically handle menu from the database. Wmanager Admin side has a menu settings page where you can add new menu or change order of the menu through simple forms.In this section we see how the menu works in WManager. In WManager we populate the menu from the database.

Table Used setup_menu

Features in Setup Menu page

In setup menu page the admin user can create or delete menu for the user site. We can set the menu access based on the roles that are available in the application. In setup menu page we have a feature called add_child if you add a child then the menu will be a dropdown menu.

There are two menu's that are available in wmanager one is Top Menu for the non admin users and the other is Admin Menu that is in admin section of wmanager.

Top Menu

Top menu is implemented through a helper function. On calling this it provides a html nav bar. Therefore we just call this function in template.php file in views to print the html string.

Usage top_menu()

The menu_setting page the admin has the opportunity to set access based on the group that are available for all the companies. Therefore only the user with particular roles can see the menus according to their needs. Therefore dynamically setting new menu and restricting the access for certain users.

Admin Menu

In Admin Menu it's all static but we have introduced dynamic menu as few extensions will need new setup pages where admin does his operations. This admin menu all the dynamic menus are restricted in the misc dropdown of the Admin menu. Admin menu does not support parent/child dropdown constraints.

Usage admin_menu()

The system differentiates the menu for admin and user through the template field in setup_menu table.

wmanager/dummy_helper_menu.1524746999.txt.gz · Last modified: 2018/04/26 12:49 by Gianluca Pelliccioli