|
Posted by "messju mohr" on 06/18/05 12:34
On Sat, Jun 18, 2005 at 08:32:19AM +0900, D_C wrote:
> is there a way to use a smarty variable as a cycle parameter? tried:
>
> {cycle values=0,stepX assign='posX' }
> {cycle values=0,$stepX assign='posX' }
> {cycle values=0,`$stepX` assign='posX' }
> {cycle values='0,`$stepX`' assign='posX' }
i think you want
{cycle values="0,$stepX" assign='posX' }
see: http://smarty.php.net/manual/en/language.syntax.quotes.php
> but i get the values 0 and "stepX" as a string...
>
> otherwise I guess i can do this but it seems verbose:
>
> {cycle values='0,1' assign='posX' }
> {assign var=posX value=$posX*$stepX}
>
> thanks in advance!
Navigation:
[Reply to this message]
|