Follow

Menu View

Variable Usage Explanation
id {% set menuItems = get('menu', 'loadItems', 'menu_name').menuItems %} {% for menuItem in menuItems %} {{ menuItem.id }} {% endfor %} Returns the IDs of the menus.
label {% set menuItems = get('menu', 'loadItems', 'menu_name').menuItems %} {% for menuItem in menuItems %} {{ menuItem.label }} {% endfor %} Returns the names of the menus.
url {% set menuItems = get('menu', 'loadItems', 'menu_name').menuItems %}
  {% for menuItem in menuItems %}
     <li><a href='{{ menuItem.url }}'>{{ menuItem.label }}</a></li>
  {% endfor %}
Returns the URLs of the menus. Just like in the example you can create links from the titles and URLs.

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk