Skip to content
Zotonic
  • Start
  • Cookbook
  • Reference
  • Releases

Live search

Search across all Zotonic content

Type at least two characters

Results are matched against titles, summaries and topics as you type.

Filters · mod_menu
  • Reference
  • Frontend developer
  • Navigation
  • Template filter
  • Transform
  • Collection

menu_flat

Module

mod_menu

Flattens the rsc menu structure for use in a template loop.

Example:

{% for item in m.rsc[id].menu|menu_flat %}
...
{% endif %}

Edit on GitHub

Related documentation

Filters

menu_expand

Takes a menu, or a menu resource id, and adds all haspart objects connected to the menu ids.

Filters

language_sort_localized

Sort a list of language codes or map with languages on their localized name in the currently selected language. This is useful for…

Filters

menu_ids

Returns all resource ids in a menu. Could return invisible and non existing resource ids. The returned ids are a flat list, the hierarchy…

Filters

menu_trail

Return a breadcrumb navigation trail for the given id.

Filters

menu_subtree

Get the subtree of an id in a menu (if any).

Filters

make_list

Forces the value to a list.

Filters

vsplit_in

This filter splits a list in shorter lists. It splits an array in N sub-arrays of more or less equal length. This is useful when displaying…

Filters

reversed

Reverse a list.

Filters

split_in

This filter split a list in shorter lists. It splits an array in N sub-arrays of more or less equal length. This is useful when displaying…

GitHub © 2026 Zotonic