XF 2.2 How to use main navi for subforums?

Robert9

Well-known member
The forum has three forums

[cats] [dogs] [cars]

When I am in forum cats, I need two clicks to come to forum dogs. I dont like it.
I could add three more links in the main navi, then I would have

[forums] [cats] [dogs] [cars]

when i click cats i get to forum cats, but the tab is set to forum.

Maybe I could have both? [forum] and [cat]?
Maybe I could have only [cats]?

Unfortunately I have forgotten what to do here. I add the tabs, and then I need to add something somewhere with
if node_id == cats, then ?
else dogs
else cars
else rest
 
In the control panel Forums > Nodes

Edit the node for the forum and choose nav section from the navigations section dropdown

Screenshot 2023-11-15 at 17.54.41.png
 
Last edited:
Thank you.
It was a more philosophical question, and a technical question of how to make a navi a chosen one.

When you have this

your forums are
[cats]
[dogs]
[cars]

and your navi looks like

[forums] [cats] [dogs] [cars]

then you can chose the [dogs], but what to show? = the philosophical question


[forums] [cats] [dogs] [cars]

[forums] [cats] [dogs] [cars]

[forums] [cats] [dogs] [cars]

Whatever you do, people will not understand what you do there.

You can do this

[forums]
[cats] [dogs] [cars]

or you can do this:

[cats] [dogs] [cars]

But if you want to do this,

[cats] [dogs] [cars] (= the technical question)


then you have to do something; I have forgotten what.
Maybe in a xml, maybe in a file, maybe in a template.

Finally, I will add these additional navi only for me to navigate faster.
 
Yes and no.

1. There are new posts, find threads, watch, forums read
2. Cant reach it on mobile with one click

=> it must be in the main navi AND it must be visible as well if the normal menu was moved to the pop-up.
The idea is to reach the forums with one click always.
 
The only way I can think of without doing custom development is to show links with an HTML widget.
[forums]
[cats] [dogs] [cars]
I prefer this one as it remains faithful to the navigation logic, without getting confused with the logic of tags, prefixes or keywords.
 
. Cant reach it on mobile with one click
In which case add the navigation items to main nav, give it a class to hide on desktop and show only on mobiles (I do that with a couple of navigation items:

Code:
@media (min-width: @xf-responsiveMedium)
{.mobilesnavonly
    {display:none}}
 
The only way I can think of without doing custom development is to show links with an HTML widget.
Yes, sure, this is the only way that would make sense if the second navi would be empty!
But it is not empty.

If custom dev or not, is not the question.

My solution for now is:

show it only to the stuff because stuff needs it. It saves many, many, many clicks every day.
There is also a widget with the three important forums, but for this we need a sidebar.
 
In which case add the navigation items to main nav, give it a class to hide on desktop and show only on mobiles (I do that with a couple of navigation items:
I have not viewed now, but my idea was to understand from where the icon comes we use for opening the menu on mobiles.
And then add three more of them with the same behavior as this icon.

Thank you for the code.
 
but my idea was to understand from where the icon comes we use for opening the menu on mobiles
I'm not entirely sure what you mean, but the icon you set in the main navigation will still show on mobiles.

For example on my forum https://cafesaxophone.com I have a navigation item which uses this image:
nav1.jpg

class defined:

nav2.jpg

and then the css I showed in previous post.

As you can see from my forum the icon does not show on desktop, but does show on mobile navigation.


Screenshot 2023-11-16 at 11.54.11.webp
 
Back
Top Bottom