Skip to main content
The bundle exposes a read-only JSON API that returns a rendered menu tree for a given menu code. This endpoint is intended for headless or JavaScript-driven frontends that need menu data at runtime.

Options

api.enabled
boolean
default:"true"
When true, the JSON API route is registered. Set to false to disable the API entirely — the route will not be added to your application’s router.
api.path_prefix
string
default:"/api/menu"
The URL prefix for the API route. The full endpoint is:
GET {path_prefix}/{code}
With the default prefix, the route is GET /api/menu/{code}.
config/packages/nowo_dashboard_menu.yaml
nowo_dashboard_menu:
    api:
        enabled: true
        path_prefix: /api/menu

Using the API

Once enabled, fetch a menu tree by its code:
GET /api/menu/main-navigation
The response contains the menu tree as JSON, resolved for the current request locale and any active context sets.
When enabled is set to false, the API route is not registered and any request to that path will return a 404. No controller or listener is skipped at runtime — the route simply does not exist.

Changing the path prefix

If your application already uses /api/menu for another purpose, change path_prefix to avoid conflicts:
config/packages/nowo_dashboard_menu.yaml
nowo_dashboard_menu:
    api:
        enabled: true
        path_prefix: /api/v1/nav
This registers the route at GET /api/v1/nav/{code}.