How to define a dynamic menu

In this page, it will be explained how to add items to the menu when using GAM.

Menu structure:

A WorkWithPlus menu is conformed by "Items" and "Menus":

HowToAddMenuItems_Structure2

An item calls a link to a panel and is part of a menu. While a menu can contain many items, or another menus too.

Creating submenus.

To add an item to a menu, you need to go to Security-->Applications option within the menu and click on the following option:

HowToAddMenuItems_Application

It will appear the MainMenu option and all the submenus that you have defined in this application. You can:

  • add items or submenus to the main menu
  • create new submenus
  • add items or submenus to another submenus.

To create a new submenu, you need to click in the "Insert" button and insert the name of the submenu.

Then, to add items to this submenu, you must click in the Menu Options icon of that submenu as follows:

HowToAddMenuItems_MenuItems

Inside this submenu, you can insert items or submenus that you already created by using the option "Insert".

In this option, it will show the following form:

HowToAddMenuItems_Form

  • Name: Name of the item or submenu to show in the menu
  • Type: If it is a menu item you must select "Simple" or if it is a Submenu you must put "Menu"
  • Permission: GAM Permission that the user must have to see the menu item
  • Resource: Panel to call
  • Resource parameters: parameters to send to the panel
  • Icon class: Font Awesome class of the icon that you want to that menu item/submenu
  • Submenu: This option is only visible if the type property is in Menu, it specifies the submenu to add

Finally, you must add to the "MainMenu" all the submenus that were created previously.