'%' and is even
| From: | Markus Fischer | Date: | Thu, 13 Sep 2001 06:40:42 +0000 |
| Subject: | '%' and is even | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-1473@lists.php.net to get a copy of this message | ||
Currently, I've this smarty code:
<table align="center">
{{section name=event loop=$event_list}}
{{if %event.first%}}
<tr>
<td width="50%"><b>Name</b></td>
<td width="25%"><b>Datum</b></td>
<td width="25%"><b>Freigegeben</b></td>
</tr>
{{/if}}
{{if %event.iteration% % 2 == 0 }}
<tr bgcolor="#333333">
{{else}}
<tr bgcolor="#444444">
{{/if}}
[...]
Normally I'ld write
{{if %event.iteration% is even}}
<tr bgcolor="#333333">
{{else}}
<tr bgcolor="#444444">
{{/if}}
But this gives me:
Warning: Undefined offset: 0 in
/public/mfischer-home/mfischer/public_html/php/include/Smarty_Compiler.class.php
on line 633
Warning: Undefined variable: negate_expr in
/public/mfischer-home/mfischer/public_html/php/include/Smarty_Compiler.class.php
on line 667
Looking at Smarty_Compiler.class.php I could easily remove this
warnings with adding some '@'s, but this ain't the right
solution, right?
Btw, I'm using latest stable 1.4.4
ty,
Markus
--
Markus Fischer, http://guru.josefine.at/~mfischer/
EMail: mfischer@guru.josefine.at
PGP Public Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
PGP Fingerprint: D3B0 DD4F E12B F911 3CE1 C2B5 D674 B445 C227 2BD0
-All your scripts are belong to Zend-