Log in

View Full Version : Conditional to display in all but xx forums


lordtopcat
07-01-2009, 01:04 AM
Hey Guys,

What I would like to do is to display something in all but a few forums. This conditional works for a single forum, but when I try and add other IDs separated with a comma, it shows an error.
<if condition="$forum[forumid] != X"></if>


I know I could use the following conditional to display it in those particular forums, but how can I alter it so it displays in all BUT the ids listed?
<if condition="in_array($forum['forumid'], array(1,2,3,6))"></if>

Any help is appreciated!

Cheers,
LTC

lordtopcat
07-04-2009, 09:50 PM
Bumpity

Lynne
07-04-2009, 10:40 PM
<if condition="!in_array($forum['forumid'], array(1,2,3,6))"></if>
The ! in front basically means when the condition is NOT true.

woodysfj40
07-16-2009, 10:36 AM
alternative:

<if condition="in_array($forum['forumid'], array(90,111,96))">
option a
<else />
option b
</if>