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.
1 parent ee84863 commit f20bac1Copy full SHA for f20bac1
docs/cookbook/admin_panel/menu.md
@@ -88,3 +88,18 @@ 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
+$newSubmenu = $menu
99
+ ->addChild('new')
100
+ ->setLabel('Custom Admin Menu')
101
+ ->setExtra('always_open', true);
102
+```
103
104
+However, ensure that you set the attribute in the parent menu, not in one of the child menu items.
105
+{% endhint %}
0 commit comments