{foreach:variable,key,value}
Opis
creates a foreach loop, needs an {end:} tag. note that the engine will add the variable to the scope, so they will not be prefixed with $t-> when used inside the loop.
Parametr
string variable - relates to $object->variable
string key - creates a variable 'key' in the current scope.
string value - optionally creates a variable 'value' in the current scope. (as in $key=>$value)
Przykład
Przykład 43-1. Setting variables for foreach
|
Przykład 43-2. Foreach in template
|
Przykład 43-3. Compiled template
|
Przykład 43-4. example output
|
| Poprzedni | Spis treści | Następny |
| {method(arguments,#quoted arguments#)} | Początek rozdziału | {if:variable} |