dashboard section controls the admin CRUD interface where you create, edit, copy, and delete menus and their items.
The dashboard is disabled by default. Set
enabled: true to register the dashboard routes in your application.Enabling the dashboard
Set to
true to register dashboard routes. When false, no admin routes are added.Layout and routing
The Twig template that dashboard views extend. Must define a
nowo_dashboard_menu_content block. Override this with your own app layout (e.g. base.html.twig) to embed the dashboard inside your application shell.The dashboard URL prefix is set in your application routing when importing the bundle’s route file, not in this YAML option. Configure it in
config/routes.yaml or the recipe’s config/routes_nowo_dashboard_menu.yaml.config/routes.yaml
Regex patterns matched against route names. Matching routes are hidden from the route selector in the item form. Useful for hiding internal Symfony routes and profiler routes.Example:
['^_', '^web_profiler']Pagination
When
true, the menus list is paginated.Number of menus shown per page. Minimum
1, maximum 500.Modals
Modal dialog sizes use Bootstrap 5 modal width classes. Valid values arenormal, lg, and xl.
Size for the create/edit menu modal.
Size for the copy menu modal.
Size for the add/edit item modal.
Size for the delete confirmation modal.
CSS class options
Arrays of CSS class choices presented as dropdowns in the menu and item edit forms. Override any sub-key to replace the default choices.
| Sub-key | Applied to | Default choices |
|---|---|---|
menu | Root <ul> | nav flex-column, nav flex-row, dropdown-menu dropdown-menu-end, nav flex-wrap gap-1 |
item | Each <li> | nav-item, dropdown-item, '' |
link | Each <a> | nav-link, dropdown-item, nav-link link-secondary |
children | Nested <ul> | nav flex-column ms-2, nav flex-column, dropdown-menu |
section_label | Section item <span> | menu-section-label, '' |
span | Item label wrapper <span> (when item_span_active is true) | d-flex align-items-center flex-nowrap, '' |
current | Active <a> | active, '' |
branch_expanded | <li> when current route is in its branch | active-branch, active-branch-has-children, '' |
has_children | <li> with children | dropdown, has-children, '' |
expanded | <li> with open children | expanded, '' |
collapsed | <li> with closed children | collapsed, '' |
Icon options
CSS size applied to rendered menu item icons. Applied as
width/height on SVG icons and as font-size on legacy icon elements. Examples: 16px, 1.2em, 24px.URL of the icon-selector Stimulus script asset. When set, the item form modal can display an icon picker. Intended for use with nowo-tech/icon-selector-bundle.
Item rendering
When
true, non-section item labels are wrapped in an extra <span> element in menu.html.twig. The wrapper class is taken from the first non-empty entry in dashboard.css_class_options.span.Form field options
Optional list of permission key strings shown in the item form. When non-empty, the permission key field renders as a select with autocomplete. When empty, a plain text input is used.Keys can be translated with the translation key
form.menu_item_type.permission_key.choice.{key} (use path__ for path:/).Optional list of HTML
id values for the root <ul> of each rendered menu. When non-empty, the ulId field in the menu form renders as a dropdown with autocomplete. When empty, a plain text input is used.Stimulus and Live Components
URL of a script that loads Stimulus and the Live Component controller and exposes
window.Stimulus. When using Symfony UX Live Component, the dashboard needs Stimulus available before the item modal opens.When null and UX Live Component is installed, the bundle falls back to its bundled script at bundles/nowodashboardmenu/js/stimulus-live.js. Set to null only if your layout already loads and exposes Stimulus on window before any modal is opened.Access control
When set (e.g.
ROLE_ADMIN), all dashboard routes require this role. Requires Symfony SecurityBundle to be installed. Leave null to rely on your application’s access_control rules or firewall configuration.Import and export
Maximum allowed size in bytes for JSON import file uploads. Default is 2 MiB (2097152 bytes). Increase or decrease to control upload size limits and reduce DoS risk from oversized files.
Rate limit for import and export actions per user or IP. Set to
Example:
false (or omit) to disable rate limiting.| Sub-key | Type | Default | Description |
|---|---|---|---|
limit | integer | 10 | Maximum number of requests per time window. |
interval | integer | 60 | Time window size in seconds. |
{ limit: 10, interval: 60 } allows 10 import/export requests per minute.Full example
config/packages/nowo_dashboard_menu.yaml