Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

Can admin menus have submenus?

Started by Muut Archive 11 years ago · 2 replies · 556 views
11 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?

11 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 2288 9 years ago
Archive · by Muut Archive, 9 years ago
2 1501 9 years ago
Archive · by Muut Archive, 9 years ago
2 4753 9 years ago
Archive · by Muut Archive, 9 years ago
1 3570 9 years ago
Archive · by Muut Archive, 9 years ago
3 1627 9 years ago