|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
Ymez510 Smarty Rookie
Joined: 27 Jul 2010 Posts: 7
|
Posted: Tue Oct 19, 2010 12:58 pm Post subject: cycle error, missing argument 3 |
|
|
Hi all,
I was hoping someone can help me with the following problem:
I would like to use the awesome power of the cycle function to alternate a background color in my table.
However I cant get this to work at all.
Very basic what I want is this:
<table>
{foreach from=$nameditems item=nameitem}
<tr style="background-color:{cycle values="#ff0000,#ffff00,#ff00ff"}">
<td>{$nameitem.title}</td>
</tr>
</table>
but instead I get the follownig error 3 times (array contains 3 items):
Warning: Missing argument 3 for smarty_function_cycle(), called in ...FOLDER\templates\_templates_c\%%D9^D9C^D9C18EE3%%newsletter_layout.tpl.php on line 123 and defined in ...FOLDER\smarty\plugins\function.cycle.php on line 44
#ff0000
Any suggestions on whats goig wrong here?
Many thanks in advance. |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Tue Oct 19, 2010 2:22 pm Post subject: |
|
|
You should update Smarty3 to RC4.
There was a bug a while ago. |
|
Back to top |
|
Ymez510 Smarty Rookie
Joined: 27 Jul 2010 Posts: 7
|
Posted: Wed Oct 20, 2010 9:57 am Post subject: |
|
|
Oh ok, thanks for the info
oddly enough it appears to function properly on an existing page though. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|