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

Moving Tabs into sub tab?

Discussion in 'Styling and Customization Questions' started by Travis, Jan 13, 2013.

  1. Travis

    Travis Active Member


    Was wondering if there is a way to move tabs into sub tabs. At the moment I have tabs for Bank and User Albums. What I want is to combine them under one tab, "Member Services". Is this possible?
  2. Morgain

    Morgain Well-Known Member

    Absolutely possible.
    I'd strongly advise using Nodes As Tabs - wonderful addon by Jake Bunce. Either search or use my Addons tutorial link in my sig - NAT is listed in it.

    (see also my Admin Favourites in my sig for more detailed help)
    You'd then make a Link Forum called Member Services.This will be used to create your new Tab.
    A Link Forum has to point at a URL. I suggest you create a new XFPage which lists and explains your Member Services. Insert its URL in the Link Forum for Member Services. (They are like partners, one is a real page, the other makes the navbar tab.)
    NAT will add options to all nodes incl. Link Forums. Enable this one as a Tab Display As Tab. Enable Permissions if you need it. Leave the page open.
    Righttclick Appearances to make another browser tab. In that open Templates.
    Put "nat" in searchbar - open nat_linkstemplate - Copy its contents
    Return to Templates - clic Create New Template button top right. Paste into the blan template.
    Name it eg "YOURNAME_member_services" (your name makes it distinctive to search and find)
    The template contents show you what to do to create your secondary links-
    Copy <li><a href="{xen:link 'url1'}">Text1</a></li> and Paste it above the line in capitals. Replace url1 with the link to Bank - don't disturb its commas. Replace Text1 with the name Bank. Repeat for User Albums.
    Save this new template - Copy its name from the top.
    Return to the other browser tab and Paste this template name into Links Template: box.
    Enable Popup Menu gives you the dropdown.
    Save Link Forum button.
    Go to frontend, Refresh - OK?
    Play with the order of display on the navbar if you prefer.
    Jake Bunce likes this.
  3. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    To handle tab selection you will need to use link-forums. It's an advanced application of the addon but it's very doable. See this post for an explanation:


    Morgain's instructions will create a popup menu with appropriate links, but that won't handle tab selection. Link-forums are the key to consolidating links under one tab with respect to tab selection.
    Travis likes this.
  4. Morgain

    Morgain Well-Known Member

    What does that mean Jake? Creating a link forum and a links template to put links under it as secondaries + dropdown, works fine for me. What am I missing?
  5. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    With your method there is no tab selection. That's the only difference.

    He wants to consolidate existing pages under the same tab, but those pages aren't nodes. If they were nodes then tab selection would be automatically handled by NodesAsTabs which knows to select the parent tab for all child nodes. By using link-forums to represent the non-node pages it allows those pages to select the parent tab as if they were child nodes under that tab. The link-forums provide node representation, if you will, so that those pages function like nodes with respect to the NodesAsTabs addon and tab selection.
  6. Travis

    Travis Active Member

    Followed those instructions and it worked a treat. Thanks! Is there any way to re-order the tabs? I would like to put it between the Forums and Members tab.
  7. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    When editing the node (that is the tab) there are settings for display order and position. It doesn't give you total control over the position because there can be interaction with tabs from other addons, but it's usually good enough. There are also options to force position which might be useful to you:

  8. Travis

    Travis Active Member

    Thank you! :)
  9. Morgain

    Morgain Well-Known Member

    oops Forgot to suggest that the Link Forum point at an XFPage which lists and explains your Member Services. So you'd have to create that XF Page and insert its URL in the Link Forum for Member Services.
    Will add this to my guide for anyone else.

    Still dont get what ake is talking about but never mind.

Share This Page