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

If not in a forum expression

Discussion in 'XenForo Questions and Support' started by kingston, Feb 10, 2011.

  1. kingston

    kingston Well-Known Member

    I want to add to an if statement that if not in a forum do this.

    I know its AND !{something}

    The forum idea is 123
  2. James

    James Well-Known Member

    Depends on the template. Use {xen:helper dump $var} to see if node_id is available in that variable.
    If so, use: <xen:if is="$var.node_id != 123">do something</xen:if>

    Wow that took a while on my phone...
    kingston likes this.
  3. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    You forgot the curlies:

    <xen:if is="{$var.node_id} != 123">do something</xen:if>
    As James said, it depends on the template. For example, edit this template:

    Admin CP -> Appearance -> Templates -> forum_view

    You can use this code in that template:

    <xen:if is="{$forum.node_id} != 123">do something</xen:if>
    James likes this.
  4. James

    James Well-Known Member

    Woops... I forgot the curlies! It was hard to type on my phone :(

Share This Page