1. 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

Discussion in 'Styling and Customization Questions' started by SectionEighty, Oct 3, 2015.

  1. SectionEighty

    SectionEighty Member


    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.
  2. SectionEighty

    SectionEighty Member

    A lil bump
  3. Brogan

    Brogan 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.
  4. SectionEighty

    SectionEighty Member

    Any idea which parameters I could use?

Share This Page