.. include:: ../../Includes.txt
f:cycle
=======
You can improve the output of the `f:for` ViewHelper using `f:cycle`. For example, you can add odd/even classes to a
table row. While you can reach the first and last elements using `f:for`, you'll need to use `f:cycle` to reach any of
the other entries.
Properties
----------
values
~~~~~~
:aspect:`Variable type`
Array
:aspect:`Description`
Input in array notation. (See example for details.)
:aspect:`Default value`
:aspect:`Mandatory`
Yes
as
~~
:aspect:`Variable type`
String
:aspect:`Description`
The name of the new variable for subsequent use in your template.
:aspect:`Default value`
:aspect:`Mandatory`
Yes
Beispiel
--------
::
{address.firstName} |
{address.lastName} |
**Output**
::
Stefan |
Froemken |
Bastian |
Krump |
Thorsten |
Ploemi |
Max |
Mustermann |