XF 1.2 do conditionals woork in .css templates?

Nudaii

Well-known member
as the title says, and also what would be a global variable to get the forum id :)

OR atleast to work at forum_view and forum_list
 

Jeremy

Well-known member
Yes, you can use conditionals in any template. However, unless the information you need is there, they most likely need some extra work (ie, setting information in the container).
 

Nudaii

Well-known member
would it be very hard to get it working for the node's in forum list and forum view?

I want to add a background image to the nodes (different per node) pulled by node id
 

Chris D

XenForo developer
Staff member
That is possible without conditionals.

When you're in a node, the forum ID of the node you're in and its parent nodes are class names attached to the <body tag.

e.g.
Code:
<body class="node47 node22" style="">
With that in mind, if you want node 22 to have a different background, you can target it like this:

Code:
.node22
{
    background-color: red;
}
Just apply your background to your requirements. Nice and easy.
 
Top