• 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?


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,