{{ menu_item }}

Properties

string object_type
Will always be "menu_item".
true/false is_valid
Indicates whether or not this references a menu_item.
guid guid
text field menu_guid
menu menu
text field parent_menu_item_guid
menu_item parent_menu_item
text field name
url field href
true/false open_in_new_tab
textarea field description
html field content
text field image_guid
image image
number depth
number order
string value
Synonymn for guid.
html output
The default output that the menu_item would produce if it were output directly to the template.
html output_in_list
The default output that the menu_item would produce if it were output directly to the template from inside a list.
list items
A list containing all of the menu items that are direct children of the current menu item.

Examples

Simple code sample to output the top 3 levels of menu items under a menu.

<ul class="menu">{% for item in menu %} <li class="menuitem menuitem-depth-1"> <a href="{{ item.href }}">{{ item.name }}</a> {% if item.items != empty %} <ul class="submenu"> {% for subItem in item %} <li class="menuitem menuitem-depth-2"> <a href="{{ subItem.href }}">{{ subItem.name }}</a> {% if subItem.items != empty %} <ul class="subSubMenu"> {% for subSubItem in subItem %} <li class="menuitem menuitem-depth-3"> <a href="{{ subSubItem.href }}">{{ subSubItem.name }}>/a> </li> {% endfor %} </ul> {% endif %} </li> {% endfor %} </ul> {% endif %} </li> {% endfor %}</ul>

Developer Overview

Liquid Markup