PDA

View Full Version : Bigger or Smaller in a Condition


Frapegliko
24 Oct 2006, 18:47
How can I define Bigger or Smaller in a Condition?

what is wrong?

<if condition="$foruminfo[forumid] == $vboptions[xxxxx] AND $vboptions[xxxxx] > 0">

MicroHellas
26 Oct 2006, 16:15
I think that is better to broke the condition in parts, like:
<if condition="$foruminfo[forumid] == $vboptions[xxxxx]">
<if $vboptions[xxxxx] > 0>
......do this
</if>
</if>

SirAdrian
26 Oct 2006, 16:19
You guys should be quoting array keys, and using the full object-form variables in template conditionals.

Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

But really... you should try to keep your application logic out of your templates and put this into your PHP or a plugin. If you do it this way, you can simplify it to something like this

Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

This way, it will make much more sense when looking at it later.