User Tools

Site Tools


wmanager:dummy_helper_menu

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
wmanager:dummy_helper_menu [2018/04/26 12:52]
Gianluca Pelliccioli
wmanager:dummy_helper_menu [2018/04/27 07:27] (current)
Gianluca Pelliccioli [Examples]
Line 1: Line 1:
 ======Menu Helper====== ======Menu Helper======
  
-=== Summary ==== +==== Summary ==== 
-Objective | Showing user and admin section menu | +Objective | Showing user and admin section menu | 
-Name | menu_helper | +Name | menu_helper | 
-Script | /applications/helpers/menu_helper.php | +Script | /applications/helpers/menu_helper.php | 
-Tables | setup_menu | +Tables | setup_menu | 
-Dependency | nothing in particular |+Dependency | nothing in particular |
  
  
-=== What are we talking about ===+==== What are we talking about ====
 This feature is about the mechanism we use to create the user menu and the admin section menu. This feature is about the mechanism we use to create the user menu and the admin section menu.
  
Line 16: Line 16:
 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. 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    |+==== How does it work ====
  
 +  * The admin and front-end template includes all the css classes for the menu;
 +  * By calling in the page views: <code>top_menu()  or admin_menu()</code> the system will provide the entries list based on roles.
 +  * Admin menu is configured using  entries in setup_menu tables (having setup_menu.template='Admin');
 +  * Top menu is configured using  entries in setup_menu tables (having setup_menu.template='Wmanager');
  
-===Features in Setup Menu page=== +The admin section inclides a configuration page to update **only** the Top menu entries. 
-In setup menu page the admin user can create or delete menu for the user siteWe 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.+{{:wmanager:helper_menu_how_to_use_it.png|}}
  
 +If your extension will need to add a new entry in the Admin menu you can do that by including the sql script onboard of your extension.
  
-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()   | 
  
  
 +==== Coding detail ====
 The system differentiates the menu for admin and user through the **template** field in setup_menu table.  The system differentiates the menu for admin and user through the **template** field in setup_menu table. 
 +
  
  
wmanager/dummy_helper_menu.1524747167.txt.gz · Last modified: 2018/04/26 12:52 by Gianluca Pelliccioli