• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 Question about if condition and classes

#1
Hi,

I currently have this snippet of code:

Code:
<xen:if is="{$thread.node_id} == '106'"><span class="nsfwsidebar">NSFW</span></xen:if>
This will display the NSFW prefix in the latest posts plugin we have, however I want to know if it's possible to display this tag only if the thread has the css class "prefix prefixRed", example in pseudocode (kind of)

Code:
if css class == 'prefix prefixRed' then <span class="nsfwsidebar">NSFW</span>
Appreciate all the responses.
 

Brogan

XenForo moderator
Staff member
#3
It's not possible to create a conditional statement based on a CSS class being applied.

You will need to use some other parameter which defines those particular threads.