Menuitem
Represents single menu item object in site structure. You can build site structure by using available menuitem objects.Available properties
These properties give access to extra features on this object.
all_children
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.
blog?
Returns true if page associated with item is blog type.
children
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.
children?
Returns true if menu item has visible and translated children objects
children_with_hidden
Same as children but includes child menuitems that are hidden.
children_with_hidden_with_data - includes page .data attribute.
content_type
Returns content type of the page associated with this item.
current?
Returns true if item is current page shown.
hidden?
Returns true if page is hidden from menu.
hidden_children
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.
path
Returns relative path for given page item.
private?
Returns true if page is password protected.
selected?
Returns true if page or one of its children (or one of their childrens etc.) is currently shown.
selected_with_children?
Returns true if this menu item is currently selected AND also has children
title
Return title of page this menu item is representing
translated?
Returns true if item is translated.
url
Returns url for page
visible_children
Returns all children of current menu item that are visible.
visible_children_with_data - includes page .data attribute.
- Basics
- Variables
- Filters
- Components
- Localization
- Keyboard shortcuts
- Objects
- Article
- Asset
- Blog
- Comment
- Element
- Language
- Mediaset
- Menu item
- Page
- Person
- Site
- Tag
- Data
- Tags
- addbutton
- assign
- blogcontext
- case
- capture
- commentform
- content
- contentblock
- cycle
- editable
- elementscontext
- for
- grouped
- if
- ifchanged
- image
- include
- load
- login
- loginblock
- menuadd
- menubtn
- menulink
- reorder
- rss_link
- stylesheet_link
- unless
- xcontent
- Examples
- Creating a navigation menu
- Creating language selection
- Blog page example
- Blog article example
- Complete page example
- Breadcrumbs
- Standard theme definition
- Elements listing
- Element page
- Components