Skip to main content
The bundle registers its Twig view path after the application paths. This means Symfony’s Twig loader always checks your templates/bundles/NowoDashboardMenuBundle/ directory first, so any file you place there silently takes precedence over the bundle’s original.

Overriding a template

1

Find the original template

Templates live inside the bundle at:
vendor/nowo-tech/dashboard-menu-bundle/src/Resources/views/
Copy the file you want to change.
2

Place your override

Create the same relative path under templates/bundles/NowoDashboardMenuBundle/ in your project:
templates/
  bundles/
    NowoDashboardMenuBundle/
      menu.html.twig          ← overrides the frontend menu template
      dashboard/
        layout.html.twig      ← overrides the dashboard shell
        index.html.twig       ← overrides the menu list page
3

Edit your override

Adjust the markup, blocks, or variables as needed. The bundle always passes menuTree, menuCode, and menuConfig to menu.html.twig; other templates receive their own documented variables.
4

Clear the cache

php bin/console cache:clear

Overridable templates

PathPurpose
menu.html.twigFrontend menu tree (sidebar, nav, etc.). Receives menuTree, menuCode, menuConfig.
dashboard/layout.html.twigLayout that all dashboard pages extend. Defines the content block.
dashboard/index.html.twigDashboard menu list.
dashboard/show.html.twigSingle menu detail and item tree.
dashboard/menu_form.html.twigCreate/edit menu form.
dashboard/item_form.html.twigCreate/edit menu item form.
dashboard/copy_menu.html.twigCopy menu form.
dashboard/import.html.twigImport menus from JSON (standalone page).
dashboard/_import_partial.html.twigPartial for the import form (loaded in modal).
dashboard/_menu_form_partial.html.twigPartial used in the menu form.
dashboard/_item_form_partial.html.twigPartial used in the item form.
dashboard/_copy_menu_partial.html.twigPartial used in the copy form.
components/ItemFormLiveComponent.html.twigLive Component template for the item form modal.
Collector/dashboard_menu.html.twigWeb debug toolbar / profiler panel.

Dashboard layout options

You have two ways to customise the dashboard shell:
The config option only swaps the extended template. Overriding the file gives complete control over the dashboard HTML. Use the config option for simple shell swaps and file overrides for structural changes.

Form themes

Some bundle templates use:
{% form_theme form '@SymfonyUXAutocomplete/autocomplete_form_theme.html.twig' %}
This makes route and permission key selectors render as searchable dropdowns (requires symfony/ux-autocomplete). When you override item_form.html.twig, _item_form_partial.html.twig, or the Live Component template, you can keep, remove, or replace this line freely — it does not block overrides.

Overriding translations

The bundle uses the translation domain NowoDashboardMenuBundle for all strings: dashboard UI labels, buttons, pagination, and form validation messages. To override a string, add the same key to your application’s translation files for that domain. Application translations take precedence — you only need to define the keys you want to change.
1

Create the translation file

Create translations/NowoDashboardMenuBundle.{locale}.yaml in your project (e.g. NowoDashboardMenuBundle.en.yaml).
2

Add only the keys you want to change

# translations/NowoDashboardMenuBundle.en.yaml

# Dashboard UI strings (dashboard.*)
dashboard:
  title: My menu admin
  title_suffix: Menus
  menus: Menu list
  new_menu: Create menu
  search_placeholder: "Search…"

# Form labels and validation (form.*)
form:
  copy_menu_type:
    code:
      regex_message: "Menu code must contain only letters, numbers and underscores."
3

Clear the cache

php bin/console cache:clear

Translation key structure

PrefixPurpose
dashboard.*UI strings: page titles, button labels, headings, pagination, flash messages.
form.*Form field labels and validation messages.
Run php bin/console debug:translation en --domain=NowoDashboardMenuBundle to list all keys available in the bundle for a given locale.