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

Combining tabs and unique id question

Discussion in 'XenForo Development Discussions' started by chrisj, Aug 22, 2012.

  1. chrisj

    chrisj Active Member

    I developed an addon that has three types of data, users, games and trophies.

    Right now you can navigate to users by psn-user/id and games by psn-game/id and I created two seperate tabs.

    Is it possible to have both of those connected to the same tab with psn-users being the default and psn-games being a sub-link?

    Currently trophies cannot be directly navigated. They are also identified by a game_id and a trophy_id to form their unique id. Should I just add a unique autoincrement column as well to make it easier? I was working on the admin side and I wanted to list all the trophies so I can edit them (just like editing users).

    It seems I can bypass xenforo's default url structure to do psn-game/game_id/trophy_id and that would allow me to not have to create a separate tab.

    Right now I'm trying to reduce the number of tabs.

    Here is my addon in action. http://psvitaforum.com/psn-users/, http://psvitaforum.com/psn-games/
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    To assign those pages to a different tab requires editing the route handler. Code example:


    Or you can use this addon:


    The latest 1.1.3 update supports changes to tab assignments via link-forums. So you would create two link-forums under the same parent node which is a tab. Or one link-forum can be the parent and the other a child, and the parent link-forum can be made a tab. Once that is done then you can remove the old tabs with CSS using the tabids. Code example:


    However, your custom style is missing the tabids. You need to fix this in your navigation template before this CSS will work:


Share This Page