Developers

Menuitem

Represents single menu item object in site structure. You can build site structure by using available menuitem objects.

List of available attributes

These properties give access to extra features on this object.

Returns list of item objects which are representing all children (whether translated or untranslated) of current item.

all_children_with_data - includes page .data attribute.

Returns true if page associated with item is blog type.

Returns list of menu item objects which represent visible and translated children of the page this menu item is currently representing.

children_with_data - includes page .data attribute.

Returns true if menu item has visible and translated children objects

Same as children but includes child menuitems that are hidden.

children_with_hidden_with_data - includes page .data attribute.

Returns content type of the page associated with this item.

Returns true if item is current page shown.
Returns custom data for the current page.

Returns true if page is hidden from menu.

Returns all hidden child menu items. Useful when creating hidden menuitems button with {% menubtn %} tag like this:
{% menubtn item.hidden_children %}

hidden_children_with_data - includes page data attribute.

If menu item is obtained with the _with_data suffix it returns image object that is attached to page from page settings.

If menu item is obtained with the _with_data suffix it returns true or false depending whether image is attached to page.

Returns the name of the page's layout.

Returns true if page is an external link.

Returns relative path for given page item.

Returns id for given page item.

Returns related page object for given menu item.

Returns true if page is password protected.

Returns true if page or one of its children (or one of their childrens etc.) is currently shown.
Returns true if this menu item is currently selected AND also has children
Return title of page this menu item is representing. It returns value of the page.menu_title with fallback to page.title when page.menu_tile is not set for the page.

Returns true if item is translated.

Returns url for page
Returns all children of current menu item that are visible.

visible_children_with_data - includes page data attribute.

Serializes the menu item into a JSON string.