PDA

View Full Version : if condition separate


Trasion
02-11-2010, 06:36 PM
<if condition="$forum[forumid] == 38,43,36">
style="border-bottom:0px solid #DEDEDE
<else />
style="border-bottom:1px solid #DEDEDE
</if>

That's the code I have.

When I try to click "save" on the template, it returns an error about not being able to use commas.

How would I separate the forumids another way in the original if condition part? I want it so all 3 of those forums show no bottom border, but all others do.

kh99
02-11-2010, 07:01 PM
You can check each one and use || (or):

<if condition="$forum[forumid] == 38 || $forum[forumid] == 43 || $forum[forumid] == 36">
style="border-bottom:0px solid #DEDEDE
<else />
style="border-bottom:1px solid #DEDEDE
</if>


If you had more than 3 forums to list you might want to try a different way, but with only 3 that's probably good enough.

Trasion
02-11-2010, 09:09 PM
Well I'll probably have around 5, so that should be good. Thanks a lot though!