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

Making the link show as active in the Admin Pannel

Discussion in 'XenForo Development Discussions' started by Kirk, Jul 24, 2014.

  1. Kirk

    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.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.
     
  2. Nobita.Kun

    Nobita.Kun Well-Known Member

    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. :)
     
  3. Kirk

    Kirk Well-Known Member

    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: Jul 25, 2014
  4. Nobita.Kun

    Nobita.Kun Well-Known Member

    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 ;)
     
  5. Kirk

    Kirk Well-Known Member

    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.
     
  6. Nobita.Kun

    Nobita.Kun Well-Known Member

    You should choose the field *Parent Navigation Entry* Or need create new Navigation (top page) then assign your child navigations :)
     
    Kirk likes this.
  7. Kirk

    Kirk Well-Known Member

    Thank you Nobtita :). Got it working now. :)
     
    Nobita.Kun likes this.

Share This Page