INPUT /  OUTPUT /  LANGUAGE





for tag

Transient logic tag

Creates a loop in the document tree. Code inside the loop is invoked repeatedly for a specified number of iterations.

Sample usage

<i:for 1 limit=10 do=i> generates the list of numbers 1 2 3 4 5 6 7 8 9 10

Fields

Primary field

The counter value of the current iteration. Can be initialised to the required starting value. The default starting value is 1.

Secondary fields

Behaviour

The count starts at the value in the primary field (1 if none is given), and the code in do is carried out once for each value up to and including limit, with the tag's name standing for the current count. Whatever the code generates each time, the for tag generates too, in order.

A for loop generates values and carries out actions, but its do code cannot create presentation tags. Use an array to create several tag instances.

Notes

See also