XF 2.1 Remove subforums from forum list (mobile)

Sentenza

Member
Hello,

I need the right code for the extra.less to disable the subforums only from the forum list. My code works, but on my mobile phone (iPhone XS) in portrait format, or when I reduce the Safari browser window, the subforums will appear again.

Code:
[data-template="forum_list"]
.node-subNodesFlat
{
display: none;
}

Thanks!
 
Solution
Its's done using CSS but the code I posted should override it.

Try using !important.

CSS:
[data-template="forum_list"]
{
    .node-subNodesFlat,
    .node-subNodeMenu
    {
        display: none !important;
    }
}
@Brogan

The forum structure is:
Level 1) Forums
Level 2) Category
Level 3) Subforums

Without the code, the subforum (level 2) is also displayed on Level 1. With the code it is hidden, but on level 2 the subforums of level 3 are displayed. This is how it should be. But this is cancelled if the window is reduced in size. So I have to change it to any mobile template?

With the style properties, all subforums will turn off.
 
Add this to the extra.less template.

CSS:
[data-template="forum_list"]
{
    .node-subNodesFlat,
    .node-subNodeMenu
    {
        display: none;
    }
}
 
Add this to the extra.less template.

CSS:
[data-template="forum_list"]
{
    .node-subNodesFlat,
    .node-subNodeMenu
    {
        display: none;
    }
}
The same problem. As soon as I reduce the size of the window, the subforums appear again on the forum overview.

It must have something to do with the Responsive styles?
If I reduce the size of the window, the forum comments disappear and the subforums are shown again. It swings from one reponsive style to the next.
 
Its's done using CSS but the code I posted should override it.

Try using !important.

CSS:
[data-template="forum_list"]
{
    .node-subNodesFlat,
    .node-subNodeMenu
    {
        display: none !important;
    }
}
 
Solution
Doesn’t work. Made subforums display style to None as above, made Elections subforum visible, this is the result:

Screen Shot 2020-09-24 at 16.05.37.png

Also, how do I change the speech bubbles to a small image, like the Australian flag for Australian politics and the US flag for American Politics?

Why are subforums not displayed as a subforum? A subforum surely should not appear as a regular forum with no parent forum?
 
Last edited:
Can Threads, messages, last post be removed? A lot of clutter and clicking on “New Posts” provides much the same info anyway. Be better to have a line of comment “Politics is for fairly serious discussion of politics/economy/environment etc”
 
Doesn’t work.
You have all nodes in the root so it won't work in your case.

You would have to move the nodes to a category.

Can Threads, messages, last post be removed? A lot of clutter and clicking on “New Posts” provides much the same info anyway. Be better to have a line of comment “Politics is for fairly serious discussion of politics/economy/environment etc”
You will be better off posting a new thread for any specific styling questions you have.

Piggybacking on existing threads just gets messy.
 
Back
Top Bottom