Hide Forums tab?

Morgain

Well-known member
I would like to hide the Forums navtab!

I've created a "Home" page (XF Page) with lots of guide links and brief text - this includes a link to the Forums page.
This is also a navtab courtesy of Nodes As Tabs.

The Forums page itself and its secondary links are now all secondary links under the Home navtab (my guide page) Plus the Forums link is top of my sidebar which is everywhere.

So I don't now need the Forums link as a tab in its own right.
But in the navigation template whatever I try to do to comment out the Forums tab section it objects!
Maybe because it has a hook in it? I get syntax error.
 
Note that Adam's code will hide the tab only when it's not selected. It will show again when you visit a page belonging to that tab. This is really the best you can do without modifying the code. If you were to remove the tab completely then all pages belonging to that tab would be orphaned which causes visual weirdness in the navbar.
 
Jake thanks I noticed that but it's OK.

I also needed to add !important to Adam's code.

Got it all really nice and simplified now. Just 3 tabs for everyone plus 1 admin (frequent pages) one for me.
 
Guys I'm still really happy with the simplicity I have here thanks to your help.
It's OK that the Forums tab appears if I go in a forum anywhere.

But it would be better since it's there if its secondary links appeared with it. At the moment I get just the main top tab with no secondaries, when the top tab appears.

Forums tab.webp
 
Guys I'm still really happy with the simplicity I have here thanks to your help.
It's OK that the Forums tab appears if I go in a forum anywhere.

But it would be better since it's there if its secondary links appeared with it. At the moment I get just the main top tab with no secondaries, when the top tab appears.

View attachment 35272

If it's the default Forums tab then there should be secondary links defined in the navigation template, unless you removed them.
 
Top Bottom