Re: [SMARTY] "if" with "or"-problem
| From: | Wom.bat | Date: | Thu, 03 Apr 2003 12:00:54 +0000 |
| Subject: | Re: [SMARTY] "if" with "or"-problem | ||
| References: | 1 2 3 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-9052@lists.php.net to get a copy of this message | ||
try to put brackets around the conditions...
ie:
{if (($Flag1|default:0 eq 1) or ($Flag2|default:1 eq 1))}
true<br>
{else}
false<br>
{/if}
{/if}
smarty seems to have some trouble with if's, for example,
{if (!$foo)}
is not possible, you have to write
{if (!($foo))}
at least this was the case until 2.5.0 ;)
regards,
David