Author Topic: <TMPL_IF > Using operators ???  (Read 1845 times)

0 Members and 1 Guest are viewing this topic.

Offline gunasundarn

  • Newbie
  • *
  • Posts: 1
<TMPL_IF > Using operators ???
« on: Wed, 12. May 2010 - 09:00:02 »
We have used following code :

<TMPL_VAR NAME='ApprovedRegistrations'> of <TMPL_VAR NAME='Capacity'>

<TMPL_IF NAME="ApprovedRegistrations" OP="==" VALUE="{tmpl_var name='Capacity'}">Test</TMPL_IF>

But we could get error message in if statement. How do i retrieve error. Please let us know.

Thanks,
Guna

Offline ClausVB

  • Administrator
  • Hero Member
  • *****
  • Posts: 570
    • Homepage: clausvb.de
Re: <TMPL_IF > Using operators ???
« Reply #1 on: Wed, 12. May 2010 - 11:15:04 »
You can only use constants in an IF statement, no variables.

Working:
Code: [Select]
<tmpl_if name='if_condition' op='>' value='5'>
<tmpl_if name='if_condition' op='==' value='3.57'>

Not working:
Code: [Select]
<tmpl_if name='if_condition' op='>' value='{tmpl_var name='Capacity'}'>
<tmpl_if name='if_condition' op='==' value='{tmpl_var name='Capacity'}'>

I hope I could help you.

Regards,
Claus