XF 1.5 Question about if condition and classes


I currently have this snippet of 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)

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


XenForo moderator
Staff member
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.