Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Can admin menus have submenus?

Started by Muut Archive 10 years ago · 2 replies · 472 views
10 years ago

Hello Grav Community,

My plugin uses the following code to create a menu at the admin plugin:
$this->grav['twig']->plugins_hooked_nav['MyMenu'] = ['route' => 'myroute', 'icon' => 'fa-quote-left'];
Is there a way to add a submenu to "MyMenu"?
What I'd like to accomplish is to have the submenu only visible after the user clicked on "MyMenu" and hide it again if the user navigates outside the plugin. Can this be done?

10 years ago

There's no logic in the Admin Plugin to handle submenus now, so the answer is no.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1355 9 years ago
Archive · by Muut Archive, 9 years ago
2 935 9 years ago
Archive · by Muut Archive, 9 years ago
2 4065 9 years ago
Archive · by Muut Archive, 9 years ago
1 2953 9 years ago
Archive · by Muut Archive, 9 years ago
3 1119 9 years ago