Table of Contents

How to create Dynamic Item Menus code?

Warning

This technique uses custom code, how to write code is not included in our support! For non-programmer users, please use the Dynamic Menu addons

  1. Go to (IMAB) Globals, then click Add New Global Button or Edit old Global code
  2. Fill in the Prefix field with the name Update Menu
  3. Fill in the Initialize Component Function field with this code:
    this.updateMenu();

  4. and fill in the Other Component Function field with this code:
    updateMenu(){
      
      //clear all item
      this.appMenus = [];
      
      //example item divider
      this.appMenus[0] = {
        "item_color_icon_left": "danger",
        "item_type": "title",
        "item_icon_left":"airplane-outline",
        "item_label" : "Example Menu" ,  
        "item_link" : "" 
      };
      
      //example item link to page
       this.appMenus[1] = {
          "item_color_icon_left": "danger",
          "item_type":"inlink",
          "item_icon_left":"home",
          "item_label" : "Home" , 
          "item_link" : "/home" 
        } ;
      
      //example item link to playstore
      this.appMenus[2] = {
        "item_color_icon_left": "danger",
        "item_type":"playstore",
        "item_icon_left":"logo-google-playstore",
        "item_label" : "Rate This App" , 
        "item_link" : ""
      } ;
      
    }
    


Last edit: 2020-10-16 02:16:56

Comment

For any question about products, please contact email support is: info@ihsana.com and info@ihsana.net

Search

img