# menu

Source: https://zotonic.com/docs/3120/menu

URI: https://zotonic.com/id/3120

Language: en



Menu queries and removal support. The query paths reuse the menu filters:

| Path                   | Result                                                                           |
| ---------------------- | -------------------------------------------------------------------------------- |
| `rsc/+id`              | Menu resource for a page, using the `menu_rsc` notification, `hasmenu`, then `main_menu`. |
| `ids/+menu_id`         | All resource ids in a menu, including invisible or non-existing ids, as with `menu_ids`. |
| `trail/+menu_id/+id`   | Breadcrumb ids through the visible menu, including the requested page.           |
| `subtree/+menu_id/+id` | Visible children below the requested page, excluding the page itself.            |

Resource arguments accept ids or names. For example, `m.menu.rsc[id]`, `m.menu.ids.main_menu`, `m.menu.trail.main_menu[id]`, and `m.menu.subtree.main_menu[id]`. Return values and ordering follow the respective filters; `ids` does not filter individual menu items for visibility.

`removal_status` accepts a list of resource ids as its payload, including every descendant of the menu item being removed. It returns:

- `remove_only`: no dependent pages are included, without revision backup.
- `recover_menu`: no dependent pages are included, with revision backup.
- `delete_dependent`: dependent pages may be permanently deleted.
- `recover_dependent`: dependent pages may be deleted but can be recovered.

The dependency check uses only the `is_dependent` flag. It does not inspect incoming connections, so the warning indicates possible deletion.

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/3120?language=en


## API access

- [API help](<https://zotonic.com/api-help>)
- [OpenAPI specification](<https://zotonic.com/openapi.json>)
- [This resource as JSON](<https://zotonic.com/api/agent/resource/3120?language=en>)
