• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Setting Xenforo Admin Menu

nrep

Well-known member
#1
I've created an addon for XF which has a couple of menu entries in the admin panel.

I've generated the routes and added the admin navigation links to appear on the "applications" menu. However, if I click on one of the links that display here, I see the custom admin page but the menu displayed on the left column is the "home" menu (and home is highlighted on the top menu).

How can I make sure that the "applications" menu is displayed alongside my custom admin page? Any advice would be great :).
 

Mr. Goodie2Shoes

Well-known member
#2
You'll have to make sure that the ID used for the navigation tab is the same as the major section of the route match object that is being created. The tl;dr is:
If the route class file you'll have something like:
PHP:
return $router->getRouteMatch($controller, $action);
in the match method of the class... change it to:
PHP:
return $router->getRouteMatch($controller, $action, 'navigationTabId');
And Voila! :D