Skip to main content
The dashboard lists all menus at the root path (e.g. /admin/menus). From here you can create new menus, navigate to a menu’s detail page, copy, export, or delete menus.

Creating a menu

1

Open the new menu form

Click New menu on the dashboard index page. The form opens in a modal (or a full page if modals are disabled).
2

Fill in the definition fields

The creation form shows the definition panel (pencil). Fill in:
FieldDescription
CodeUnique machine-readable identifier, e.g. sidebar. Cannot be changed after creation for base menus.
NameHuman-readable label shown in the dashboard.
ContextOptional JSON object that disambiguates menus with the same code, e.g. {"partnerId": 1}. Leave empty for the default variant.
IconOptional icon identifier, e.g. bootstrap-icons:house.
3

Save

Click Save. The dashboard redirects to the menu detail page where you can add items and configure additional options.
The combination of code + context must be unique. Attempting to create a menu with a duplicate code and context combination shows a validation error.

Editing a menu

From the menu detail page, two edit buttons are available:

Definition (pencil)

Edits the identity fields:
  • Code — not editable on base menus
  • Name
  • Context (JSON)
  • Icon

Configuration (gear)

Edits the rendering and behavior options:
FieldDescription
Permission checkerService that determines which items are visible. Select from registered checkers.
Depth limitMaximum nesting depth to render. Leave empty for unlimited.
CollapsibleWrap the whole menu in a collapsible block (Bootstrap 5 collapse).
Collapsible expandedWhether the menu starts open or closed when collapsible is on.
Nested collapsibleGive each item with children a toggle to expand or collapse its subtree.
Root <ul> idOptional id attribute on the menu’s root <ul> element (ulId).
CSS classesPer-class dropdowns — see the table below.

Per-menu CSS class fields

FieldApplied to
classMenuThe root <ul> element
classItemEach <li> element
classLinkEach <a> element
classChildrenNested <ul> elements
classCurrentThe active/current item
classBranchExpandedAn ancestor of the current item
classHasChildrenItems that have children
classExpandedAn expanded collapsible item
classCollapsedA collapsed collapsible item
classSectionLabelSection-type items (non-link group headers)
CSS class choices shown in the dropdowns are configured via dashboard.css_class_options in your bundle YAML. You can restrict the options to your project’s design system classes.

Copying a menu

Copying duplicates a menu together with all its items (including the full hierarchy and translations). Only the code and name change.
1

Open the copy form

Click the Copy button on the menu detail page or in the list row.
2

Set the new code

Enter a unique code for the copy. The form pre-fills with {original_code}_copy.
3

Save

Click Copy. The dashboard redirects to the new menu’s detail page.
The copied menu inherits the same context, icon, CSS classes, permission checker, depth limit, and collapsible settings as the original. The base flag is reset to false on the copy.

Deleting a menu

Clicking Delete on a menu removes the menu and all its items (cascade delete). A confirmation modal is shown before the action is performed.
Deletion is permanent and cannot be undone. Export the menu as JSON first if you need a backup.

Exporting and importing menus

You can transfer menus between environments using the JSON export/import feature.

Export

  • Export all menus — downloads a single JSON file containing every menu and its items.
  • Export one menu — downloads a JSON file for the selected menu only (filename: menu-{code}-export.json).

Import

1

Open the import page

Click Import on the dashboard index. The form is available both as a full page and as a modal.
2

Choose a JSON file

Upload a file produced by the export action. The same JSON format is accepted for single menus and multi-menu exports.
3

Select an import strategy

StrategyBehaviour
Skip existingMenus that already exist (same code + context) are left untouched.
ReplaceExisting menus’ items are replaced with the imported data.
4

Import

Click Import. Flash messages report how many menus were created, updated, or skipped. Errors (invalid format, missing code) are shown as error messages.
Item trees and per-locale translations are preserved during export and import.