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

XF 1.1 Adding Resource Manager Categories to Navigation

Discussion in 'Styling and Customization Questions' started by Wysie, Aug 28, 2013.

  1. Wysie

    Wysie Member

    Hi,

    I want to remove the Resources tab and make it so that each of my Resources categories is it's own tab, and for them to be selected when the tab is open. [​IMG] (like so)

    How would I go about doing this?

    Is there a way of hiding the Resources tab via the EXTRA.css in case I want to add it again in future?

    Thanks,
     
  2. Steve F

    Steve F Well-Known Member

    Add this to EXTRA.css template
    Code:
    .navTab.resources
    {
            display: none;
    }
    
    As for linking to your resources with tabs, use Node As Tabs add-on, works great for this.
     
  3. Wysie

    Wysie Member

    I do have this, however it won't keep the tab selected upon using it will it?
     
  4. Steve F

    Steve F Well-Known Member

    Not sure, I havent tested that, but I can.
     
  5. Wysie

    Wysie Member

    The CSS didn't work in the EXTRA.css, and I would appreciate it if you could. For reference, my site is here btw.
     
  6. Jeremy

    Jeremy XenForo Moderator Staff Member

    Use !important.
     
  7. Wysie

    Wysie Member

    This doesn't seem to be working either. [​IMG]

    Also, would using NodesAsTabs to add a tab for each category in Resource Manager keep the tab selected when they are viewing that category? Or would I have to insert manually into navigation?
     
  8. Jeremy

    Jeremy XenForo Moderator Staff Member

    Your style is incorrect, the resources tab has the following HTML:
    HTML:
    <li class="navTab $extraTabId Popup PopupControl PopupContainerControl PopupOpen">
                    <a href="http://www.toomuchminecraft.com/resources/" class="navLink NoPopupGadget" rel="Menu">Resources</a>
    </li>
    The correct HTML would be:
    HTML:
    <li class="navTab resources Popup PopupControl PopupContainerControl PopupOpen">
                    <a href="http://www.toomuchminecraft.com/resources/" class="navLink NoPopupGadget" rel="Menu">Resources</a>
    </li>
    You'll want to look into your navigation template to fix this.
     
  9. Wysie

    Wysie Member

    Thanks, this worked. Now to link my Resource categories into their own Nav tabs, I have created a 'Link Forum' node and used the NodesAsTabs plugin for my Resources category 'Skins' here however the Skins tab is not selected in the navigation. How would I go about doing this?
     
  10. Jeremy

    Jeremy XenForo Moderator Staff Member

    That didn't work. You can replace $extraTabId with resources. You have now hidden your Wiki and Server tabs from the navigation bar. $extraTabId should look like this in the template:
    HTML:
                    <li class="navTab {$extraTabId} {xen:if $extraTab.selected, 'selected', 'PopupClosed'}">
                        <a href="{$extraTab.href}" class="navLink">{$extraTab.title}</a>
                        <xen:if is="{$extraTab.selected}"><div class="tabLinks"></div></xen:if>
                    </li>
    
     
  11. Wysie

    Wysie Member

    I don't trust myself, I've undone the changes I made, what exactly am I changing? I see many $extraTabId's in the navigation. Do you know which line?
    Thanks.
     
  12. Jeremy

    Jeremy XenForo Moderator Staff Member

    I posted a pristine copy in my last post. Search for class="navTab". $extraTabId is most likely missing the braces.
     
  13. Wysie

    Wysie Member

    There are multiple $extraTabId's in there, could I give you access to an admin account and you sort it for me accordingly?
     
  14. Jeremy

    Jeremy XenForo Moderator Staff Member

    I can't as of right now, but if you see an instance of $extraTabId without braces around it, you should add them.
     
  15. Wysie

    Wysie Member

    I've done that, works fine :) Now I need to make my tabs for the Resource Categories, I've tried using NodesAsTabs but they don't stay selected upon clicking, as can be seen here. Would it be best to do via NodesAsTabs or not?

    I've tried making a conditional statement so that when it is selected, it will insert selected into the class, but this didn't work. Just need the tabs to stay selected when a user is on the appropriate Resource category.
     
  16. Jeremy

    Jeremy XenForo Moderator Staff Member

    I've never used Nodes As Tabs. You should ask in the add-on thread for support.

    You also completely removed the $extraTabId from the classes for your tabs.
     
  17. Wysie

    Wysie Member

    How would we go about making the tab used for each Resource category as tabs to be selected when viewing them, so they act normal? When it redirects to the appropriate Resource category?
     
  18. Jeremy

    Jeremy XenForo Moderator Staff Member

    You will need to ask in the add-on's support thread, I've never used the add-on.
     

Share This Page