XF 2.2 How to show subforums of one specific node on forum list

Bram

Well-known member
I have a specific question I can't seem to find an answer for after extensive googling for it.

Most of my forums have deeper lying subforums which I never show on Forum List. However one specific forum that gets often overlooked (forum 6 in the example below) has deeper subforums that I would like to display on the forum list page only.

Is this even possible in XF2? We had this working in XF1 but can't seem to figure out anymore how we did that back in the days.

Category 1
  • Forum 1
  • Forum 2

Category 2
  • Forum 3
  • Forum 4

Category 3
  • Forum 5
  • Forum 6
-- Sub forum 1
-- Sub forum 2
-- Sub forum 3
-- Sub forum 4
-- Sub forum 5
-- Sub forum 6
-- Sub forum 7
-- Sub forum 8
-- Sub forum 9
 
@Bram

If you want to show sub-forums only to a specific node, add this to your extra.less template:
Less:
.node-subNodeMenu {
    display: none;
}

.node--idX .node-subNodeMenu {
    display: initial;
}

The X is your node ID. Make sure you have enabled sub-forums in Style properties > Node/forum list.

That way you can show sub-forums only for the specified node.
 
@BassMan you are an absolute legend!

At first I used your code but it didn't work until I realized I probably requested the wrong solution but I figured it out

With the subforum display style set to: Listed below node, and the following code it worked great:
.node-subNodesFlat {
display: none;
}

.node--idx .node-subNodesFlat {
display: initial;
}

Again, thank you so much! Where can I buy you a coffee?!
 
Back
Top Bottom