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

<xen:if is="in_array({$forum.node_id}, array(2,4,6,7))"> or similar array in template?

Discussion in 'XenForo Questions and Support' started by Miko, Oct 18, 2010.

  1. Miko

    Miko Well-Known Member

    I know it has been mentioned before under other threads... but no one asked directly as far as i know

    Is there a proper way to have a conditional array in the templates?

    For example an array of forum node ids:

    <xen:if is="in_array({$forum.node_id}, array(2,4,6,7))">  your content here... </xen:if>
    Please note that the code above does not work and it's here for illustrative purpose only

    Thank you,

  2. Vladislav Rastrusny

    Vladislav Rastrusny Active Member

    If you are writting an addon, you can check a condition in controller and then just <xen:if is="$myCondition"> check should be added.
  3. Miko

    Miko Well-Known Member

    no addon just asking for template conditional....
  4. dutchbb

    dutchbb Well-Known Member

  5. Miko

    Miko Well-Known Member

Share This Page