Liquid function for Menu (Dynamic menu in bc)

{% component type: "menu", alias: "<menuAlias>" %}

The result is rendering of the menu by alias. Default layouts described in Menu layouts. Component will render menu.layout and let the rest subrendering behavior to the include logic. Menu items should be rendered ONLY if collectionVariable isn't set.

Otherwise return empty string.


Options:

  • type - the name of entity that needs to be used for the component retrieving function.
  • alias - alias of the content holder that need to be used for content output
  • collectionVariable - the liquid variable name that will get the retrieved menu object with the tree of menu items.
  • Properties:
       {
         "name": "Name",
         "alias": "alias",
         "items": [
           {
             "id": 715,
             "itemId": "html_attr_id",
             "itemName": "Link Title",
             "itemURL": "/link/url",
             "itemTargetFrame": "_blank",
             "itemClass": "repairing-service",
             "itemCustomAttribute": 'data-attr1="value1" data-attr2="value2"',
             "itemEnabled": true,
             "items": []
           },
         ]
       }
                
  • <custom_named_param> - all name-value pairs of the parameters that are not specified above will be transferred as liquid variables inside the layout.