Documentation · ViewHelper reference

XSD schema file | vhs master

Iterator / RangeViewHelper

Iterator Range ViewHelper

Implementation of range for Fluid

Creates a new array of numbers from the low to the high given value, incremented by the step value.

Usage examples

xml Numbers 1-10: {v:iterator.implode(glue: ',') -> v:iterator.range(low: 1, high: 10)} Even numbers 0-10: {v:iterator.implode(glue: ',') -> v:iterator.range(low: 0, high: 10, step: 2)} /

  • Tag usage example

    <v:iterator.range low="123" high="123" step="123" as="NULL">
    	<!-- tag content - may be ignored! -->
    </v:iterator.range>
  • Inline usage example

    {v:iterator.range(low: 123, high: 123, step: 123, as: 'NULL')}

Arguments

Argument Description Type
as

Template variable name to assign; if not specified the ViewHelper returns the variable instead.

string
high

The high number of the range to be generated

integer
low

The low number of the range to be generated

integer
step

The step (increment amount) between each number

integer
Required attribute

Revision history