{module_menu}

Description

Displays a single dynamic menu when placed on the page or a template. Take a look at this How to article for more a step-by-step implementation guide.

Syntax

{module_menu menuID="ID" version="1" render="collection" collection="my_custom_collection_name" template="/folder/template.tpl"}

or

{module_menu menuID="ID" collection="my_custom_collection_name" template="/folder/template.tpl"}

Note: When using named parameters always wrap the individual parameters in double quotes. Also, do note that modules using named parameters do not work for campaigns just yet.

Parameters

  • version - 1 (if not specified the default is 1)
  • render - for this module the value of this parameter can only be collection (if no value is specified the default will be collection). For more information on how to use this parameter take a look at the render parameter's article for more details on how to use it
  • menuId - system generated menu id (do not change)
  • collection - use this if you need to access the module's Liquid output tags
  • template - render the module using a custom template. You can leave the value of the template parameter blank to suppress the original output and use Liquid output tags instead

This module can be rendered:

  • fixed layout - by default the menu is rendered as a table nested in a div element
  • using a custom template - this module supports custom templates
  • using Liquid collections - this is the Liquid output tags you can use:
Liquid tag Description
{{id}} the menu item's Id
{{parentId}} the ID of its parent (or -1 if this is a root menu entry)
{{label}} the item's label
{{tooltip}} the item's tooltip
{{url}} the menu item's URL
{{targetFrame}} possible values are _blank, _self and _top. This parameter is used to specify the frame you want the item to open in.
{{image}} the image to be displayed for this particular menu item
{{imageOver}} the image to be displayed when the menu item is hovered
{{imageSelected}} the image to be displayed when the menu item is selected
{{css}} the CSS class to be applied to this item
{{cssOver}} the CSS class to be applied to this item when it is being hovered
{{cssSelected}} the CSS class to be applied to this item when selected
{{width}} the width of the element
{{height}} the height of the element
{{items}} This represents the children elements of this particular menu entry in JSON format

Examples

  • {module_menu menuId="128392"} - will generate the menu with the ID 128392
  • {module_menu menuId="128392" template="/layouts/custom/menu1.tpl"} - will render the menu according to the custom template
  • {module_menu menuId="128392" collection="collection1" template=""} - in this case nothing will be displayed, however the module's Liquid tags will become available in the collection1 collection.

Syntax

{module_menu,menuId}

Parameters

  • menuId - system generated menu id (do not change)

Layouts

  • The module is not rendered with a specific layout, it can be customized using either of the 2 methods below::
    • Site Manager > Menus > *YOURMENU* > Menu look / Items look (see this article for future reference)
    • Your own css styles applied to the classes and ids generated for the module

Enhanced usability and functionality is provided by module_menu v2, which we strongly recommend using

Examples

  • {module_menu,128392} - will generate the menu with the Id 128392