How to show the menu in your application

Once the load procedure was created by the K2BMenu pattern you may want to show the menu in your master page or in another Web Panel.

Adding the menu to the master page - Using the GAM integration module.

If you are going to use GAM, and you want to integrate it with K2BTools, the accordion menu will appear after the GAM integration module is installed. Just make sure that the procedure K2BGetUserMenu is called inside the master page you are using (by default all K2BTools master pages include the call to that procedure).

Adding the menu to the master page - without using the GAM integration module.

The K2BAccordionMenu is loaded by calling the procedure K2BGetUserMenu. In order to include the call to the generated menu you must edit this procedure.

// To be completed by developer
// Returns the user menu
K2BListPrograms.Call(&ListPrograms)
&MenuItems = K2BListProgramsToMultiLevelMenuSDT(&ListPrograms)

K2BAccordionMenu default SDT Load in K2BGetUserMenu

You must change it in order to call the load procedure. If the procedure generated by K2BMenu Pattern is called K2BMainMenuStaticMenuLoader, you must substitute the code above with the following code.

&MenuItems = K2BMainMenuStaticMenuLoad.Udp()
K2BAccordionMenu customization to load SDT with a K2BMenu Pattern generated procedure

Adding the menu in other Web Panels (or Master Pages)

If you want to use the menu in another webpanel or master page, you must follow this steps

  1. Go to the webform part of the webpanel and place the Accordion Menu user control in the webform.
    K2BAccordionMenuInWebForm
    K2BAccordionMenu in WebForm

  2. Go to the events part and add the following code in start event
    &MenuItems = K2BMainMenuStaticMenuLoad()
    K2BAccordionMenu event start code