sequence
Summary
Creates a sequence that can be iterated.Usage
{sequence name=name loop=loop}
Parameters
Name | Type | Description | Required |
---|---|---|---|
name | string | The name of the target namespace. | Yes. |
loop | array | The iteration elements (as an array). | Yes. |
Description
This function allows the creation of a sequence which can be iterated. If the number of iterations exceed the length of the sequence, the contents of the sequence will be wrapped and thus repeated. It is typically useful when it comes to the creation of lists / tables with alternating colors. Both the name and the elements (which will be iterated) must be defined.
Balazs Halasy (06/02/2004 1:23 pm)
Balazs Halasy (28/04/2005 2:01 pm)
Comments
how it actually works
Thursday 26 November 2009 11:11:01 am
zurgutt
{sequence name='bgtype' loop=array('bglight', 'bgdark')}
{for 0 to $numRows as $rowNr}
{sequence name='bgtype'}
<tr class="{$bgtype:item}">
....