Is there an elegant way to do changing row-colors in Smarty-templates?
| From: | Jan Skopek | Date: | Sat, 04 Oct 2003 12:50:47 +0000 |
| Subject: | Is there an elegant way to do changing row-colors in Smarty-templates? | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-10292@lists.php.net to get a copy of this message | ||
Does anybody know an elegant way to change the bg-color of an tablerow
within in an foreach-loop?
Imagine this:
<table>
{foreach from=$foo item=bar}
<tr bgcolor="{$color...?}">
<td>{$bar}</td>
</tr>
{/foreach}
</table>
Thank a lot for anwers!
Greets
Jan