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

Setting Xenforo Admin Menu

Discussion in 'XenForo Development Discussions' started by nrep, Apr 5, 2015.

  1. nrep

    nrep Well-Known Member

    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 :).
  2. Mr. Goodie2Shoes

    Mr. Goodie2Shoes Well-Known Member

    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:
    return $router->getRouteMatch($controller$action);
    in the match method of the class... change it to:
    return $router->getRouteMatch($controller$action'navigationTabId');
    And Voila! :D
    nrep and Steve F like this.
  3. nrep

    nrep Well-Known Member

    Perfect, thank you very much @Mr. Goodie2Shoes! I'll modify my addon and add this now :).

Share This Page