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
  • Query
  • Collection

menu_subtree

Module

mod_menu

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

Returns the subtree of the filter value. Useful for showing a part of a menu when browsing sub-pages.

If the given id is not found inside the menu, it returns undefined.

If no argument is given, it takes menu from the resource with the name main_menu.

Edit on GitHub

Related documentation

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

extract

Extract a specific property from each item in a list.

Filters

filter_by

Filter a list of items based on a property value and optional predicate.

Filters

sum

Sum a list of numbers.

Filters

group_firstchar

Group a list of sorted model#rsc resource IDs on their first letter of the title or another resource property. After grouping, it splits…

Filters

index_of

Returns the index of the first occurrence of the item in the given list.

Filters

first

Returns the first character or element.

Filters

without_embedded_media

Filter out media ids that are embedded in the body , body_extra and text blocks of your page.

GitHub © 2026 Zotonic