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
Last revision Both sides next revision
wmanager:dummy_helper_menu [2018/04/26 10:58]
raghav naik
wmanager:dummy_helper_menu [2018/04/27 07:27]
Gianluca Pelliccioli
Line 1: Line 1:
 ======Menu Helper====== ======Menu Helper======
 +
 +==== Summary ====
 +^ Objective | Showing user and admin section menu |
 +^ Name | menu_helper |
 +^ Script | /applications/helpers/menu_helper.php |
 +^ Tables | setup_menu |
 +^ Dependency | nothing in particular |
 +
 +
 +==== What are we talking about ====
 +This feature is about the mechanism we use to create the user menu and the admin section menu.
 +
 +{{:wmanager:helper_menu.png?600|}}
 +
 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'); 
 + 
 +The admin section inclides a configuration page to update **only** the Top menu entries. 
 +{{: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. 
 + 
 + 
 + 
 + 
 + 
 + 
 + 
 + 
 + 
 + 
 +==== Coding detail ==== 
 +The system differentiates the menu for admin and user through the **template** field in setup_menu table.  
 + 
 +==== Examples ==== 
 + 
 +<accordion> 
 +<panel title="Collapsible Group Item #1"> 
 +Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. 
 +</panel> 
 +<panel title="Collapsible Group Item #2"> [...] </panel> 
 +<panel title="Collapsible Group Item #3"> [...] </panel> 
 +</accordion> 
wmanager/dummy_helper_menu.txt · Last modified: 2018/04/27 07:27 by Gianluca Pelliccioli