We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ee84863 + f0cccc6 commit 27b010cCopy full SHA for 27b010c
docs/cookbook/admin_panel/menu.md
@@ -88,3 +88,19 @@ final readonly class MenuBuilder implements MenuBuilderInterface
88
}
89
90
```
91
+
92
+{% hint style="success" %}
93
+**🧠 Collapse your custom menu by default**
94
95
+It's possible to expand your parent menu category on page load by default. For that, you have to set the `setExtra` attribute like this:
96
97
+```php
98
+$library = $menu
99
+ ->addChild('library')
100
+ ->setLabel('app.ui.library')
101
+ ->setLabelAttribute('icon', 'tabler:books')
102
+ ->setExtra('always_open', true);
103
+```
104
105
+However, ensure that you set the attribute in the parent menu, not in one of the child menu items.
106
+{% endhint %}
0 commit comments