How to add to menu?


Well-known member
I have added a new public function to controlleradmin/tools.php, and managed to call it manually.

How can I add this function to the tools menu in the ACP so i can call this th lazy way i.e. button click :D



1. i hope you've used the event listener system to add the method and not via file edit:p

2. you can create new acp menu entries in your acp => development => admin navigation (you need to enable debug mode to see the development tab)


Active member
I quick (pro) tip:
During the creation of an admin navigation you are asked for an „Admin Navigation ID“.
It sounds trivial but this ID is used in your "WhatEver_Route_PrefixAdmin_Something' as the third parameter of "$router->getRouteMatch()"

So that means if you create an admin navigation with the ID of "test123" the corresponding line in AdminPrefix/Something.php has to look like this:
return $router->getRouteMatch('WhatEver_ControllerAdmin_Something', $action, 'test123');

What happens if you don't pay attention to this is that the AdminController you are linking to will always open in the home tab and the breadcrumb won't work.

It took me twenty minutes to figure out so I thought I'd share it with you. :)