XF 1.1 Adding Resource Manager Categories to Navigation

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.
(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,
 

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.
 

Wysie

Member
Use !important.
This doesn't seem to be working either.


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?
 

Jeremy

Well-known 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.
 

Wysie

Member
Your style is incorrect, the resources tab has the following HTML:
You'll want to look into your navigation template to fix this.
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?
 

Jeremy

Well-known 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>
 

Wysie

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:
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.
 

Jeremy

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

Wysie

Member
I posted a pristine copy in my last post. Search for class="navTab". $extraTabId is most likely missing the braces.
There are multiple $extraTabId's in there, could I give you access to an admin account and you sort it for me accordingly?
 

Jeremy

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

Wysie

Member
I can't as of right now, but if you see an instance of $extraTabId without braces around it, you should add them.
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.
 

Jeremy

Well-known 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.
 

Wysie

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.
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?
 
Top