Making the link show as active in the Admin Pannel

Kirk

Well-known member
#1
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.png

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.
 

truonglv

Formerly Nobita.Kun
#2
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. :)
 

Kirk

Well-known member
#3
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:

truonglv

Formerly Nobita.Kun
#4
Okay so i have this.
PHP:
return $router->getRouteMatch('KAH_Quiz_ControllerAdmin_Quiz', $routePath, 'quiz');
and the result is this.


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 ;)
 

Kirk

Well-known member
#5
I did that already.
adminNavSettings.png
I click on the Quiz link and shows me the template i created but the active link is still showing as Home.
 

truonglv

Formerly Nobita.Kun
#6
You should choose the field *Parent Navigation Entry* Or need create new Navigation (top page) then assign your child navigations :)
 
Top