Objective | Showing user and admin section menu |
---|---|
Name | menu_helper |
Script | /applications/helpers/menu_helper.php |
Tables | setup_menu |
Dependency | nothing in particular |
This feature is about the mechanism we use to create the user menu and the admin section menu.
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.
top_menu() or admin_menu()
the system will provide the entries list based on roles.
The admin section inclides a configuration page to update only the Top menu entries.
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.
The system differentiates the menu for admin and user through the template field in setup_menu table.