Skip to main content
The 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

dashboard.enabled
boolean
default:"false"
Set to true to register dashboard routes. When false, no admin routes are added.

Layout and routing

dashboard.layout_template
string
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
nowo_dashboard_menu:
    resource: '@NowoDashboardMenuBundle/Resources/config/routes_dashboard.yaml'
    prefix: /admin/menus
dashboard.route_name_exclude_patterns
string[]
default:"[]"
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

dashboard.pagination.enabled
boolean
default:"true"
When true, the menus list is paginated.
dashboard.pagination.per_page
integer
default:"20"
Number of menus shown per page. Minimum 1, maximum 500.

Modals

Modal dialog sizes use Bootstrap 5 modal width classes. Valid values are normal, lg, and xl.
dashboard.modals.menu_form
string
default:"normal"
Size for the create/edit menu modal.
dashboard.modals.copy
string
default:"normal"
Size for the copy menu modal.
dashboard.modals.item_form
string
default:"lg"
Size for the add/edit item modal.
dashboard.modals.delete
string
default:"normal"
Size for the delete confirmation modal.

CSS class options

dashboard.css_class_options
object
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-keyApplied toDefault choices
menuRoot <ul>nav flex-column, nav flex-row, dropdown-menu dropdown-menu-end, nav flex-wrap gap-1
itemEach <li>nav-item, dropdown-item, ''
linkEach <a>nav-link, dropdown-item, nav-link link-secondary
childrenNested <ul>nav flex-column ms-2, nav flex-column, dropdown-menu
section_labelSection item <span>menu-section-label, ''
spanItem label wrapper <span> (when item_span_active is true)d-flex align-items-center flex-nowrap, ''
currentActive <a>active, ''
branch_expanded<li> when current route is in its branchactive-branch, active-branch-has-children, ''
has_children<li> with childrendropdown, has-children, ''
expanded<li> with open childrenexpanded, ''
collapsed<li> with closed childrencollapsed, ''

Icon options

dashboard.icon_size
string
default:"1em"
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.
dashboard.icon_selector_script_url
string|null
default:"null"
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

dashboard.item_span_active
boolean
default:"false"
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

dashboard.permission_key_choices
string[]
default:"[]"
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:/).
dashboard.id_options
string[]
default:"[]"
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

dashboard.stimulus_script_url
string|null
default:"null"
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

dashboard.required_role
string|null
default:"null"
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

dashboard.import_max_bytes
integer
default:"2097152"
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.
dashboard.import_export_rate_limit
object|false
default:"false"
Rate limit for import and export actions per user or IP. Set to false (or omit) to disable rate limiting.
Sub-keyTypeDefaultDescription
limitinteger10Maximum number of requests per time window.
intervalinteger60Time window size in seconds.
Example: { limit: 10, interval: 60 } allows 10 import/export requests per minute.

Full example

config/packages/nowo_dashboard_menu.yaml
nowo_dashboard_menu:
    dashboard:
        enabled: true
        layout_template: 'base.html.twig'         # your app layout
        route_name_exclude_patterns:
            - '^_'
            - '^web_profiler'
        pagination:
            enabled: true
            per_page: 20
        modals:
            menu_form: normal
            copy: normal
            item_form: lg
            delete: normal
        css_class_options:
            menu:
                - 'nav flex-column'
                - 'nav flex-row'
            item:
                - 'nav-item'
                - 'dropdown-item'
        icon_size: '1em'
        item_span_active: false
        icon_selector_script_url: null
        permission_key_choices:
            - authenticated
            - admin
            - 'path:/admin'
        id_options:
            - main-menu
            - sidebar-menu
        required_role: ROLE_ADMIN
        import_max_bytes: 2097152
        import_export_rate_limit:
            limit: 10
            interval: 60