Making the link show as active in the Admin Pannel

Kirk

Well-known member
So now that i got the admin page working with the text I created in the admin template (See screenshot below):
Admin CP   Quiz for XenForo.webp

As you can see it shows the Home link as the active menu. What I want to know is, How do I make it show the Quiz Link show as the active menu link in the admin panel.

I'm guessing I don't use the code event listener navigation_tabs to make the admin link show as active because it's meant for the public links correct? I'm going to take a wild guess that i have to use the buildAdminLink.

Sorry for all the noobie questions my fellow XenForo developers.
 
Look at.
PHP:
return $router->getRouteMatch('XenForo_ControllerAdmin_CodeEvent', $action, 'codeEvents');

The value 'codeEvents' is admin navigation tab ID. So edit your route and fill your admin navigation ID. :)
 
Look at.
PHP:
return $router->getRouteMatch('XenForo_ControllerAdmin_CodeEvent', $action, 'codeEvents');

The value 'codeEvents' is admin navigation tab ID. So edit your route and fill your admin navigation ID. :)

Okay so i have this.
PHP:
return $router->getRouteMatch('KAH_Quiz_ControllerAdmin_Quiz', $routePath, 'quiz');

However i want the quiz link to be active not the Home link. Is there something i need to add to the ControllerAdmin to make the quiz link active?
 
Last edited:
Okay so i have this.
PHP:
return $router->getRouteMatch('KAH_Quiz_ControllerAdmin_Quiz', $routePath, 'quiz');
and the result is this.
admin-cp-quiz-for-xenforo-png.78740


However i want the quiz link to be active not the Home link. Is there something i need to add to the ControllerAdmin to make the quiz link active?
Then move to tab Development->Admin Navigation create your Admin Navigation :) Then you did :D

Make sure new navigation ID is same in your route ;)
 
I did that already.
adminNavSettings.webp
I click on the Quiz link and shows me the template i created but the active link is still showing as Home.
 
You should choose the field *Parent Navigation Entry* Or need create new Navigation (top page) then assign your child navigations :)
 
Top Bottom