XF 2.1 How can I style forum nodes so they do not create line breaks?

beerForo

Well-known member
I want to not use category headers. To me they really serve no purpose, so I want simply a list of the forum nodes. But when I do this, there is a line break between each forum node.

The one that says "Cat" is actually a category node added as a child to the forum node. But how can I have my list of forum nodes look like that?

PS. Can we have descriptions show here?

node_forums.webp
 
This is what forum nodes only looks like.

I am trying to avoid these line breaks, so it looks the same as when a category header is there but I don't want the header. One you create forum nodes only, "sections" appear instead of it being incorporated.

node_forums2.png
 
Last edited:
The CSS for the nodes will work better if you have them in a single category. If you put them into a category you could simply hide the category bar using css inside the template extra.less:

Code:
.block--category .block-header { display: none; }
 
I will try that thanks!
As an alternate, is there a way to reduce the grey space in between each forum node? I will go for whichever looks better, but yours sounds good!
PS. Can we show descriptions in these, under the titles? I'd like to add very short forum node descriptions and have them show if possible. You rock man!
 
Well, you could add this:

Code:
[data-template="forum_list"] .p-body-pageContent .block {
    margin-bottom: 0;
}
but it doesn't take care of the border-widths + border-radius. I'd suggest doing what I mentioned above as XF will handle all of that nicely for you.

Descriptions, there's an option in the style properties, use the admin search (top right) nodeListDescriptionDisplay
 
Top Bottom