fm:Loop


The loop component is a kind of pseudo-component; It is only used within the various -list components (like fm:MediaList, fm:CommentList etc).

Basically, this is an iterator to process data returned by list components; for every item returned the loop will process it with the markup provided within it's tags.

Have a look at the following example:

Example

<fm:CommentList pageSize="5"> <ol> <fm:Loop> <li>{$comment_comment}</li> </fm:Loop> </ol> </fm:MediaList>

outputs:

<ol> <li>Here's my comment!</li> <li>Here's my comment!</li> <li>Here's my comment!</li> <li>Here's my comment!</li> <li>Here's my comment!</li> </ol>

Supported attributes

This component does not accept any attributes.

Template variables

This component inherits variables from its parent component; variables created by, for example, an fm:MediaList are used for every item returned by the Loop component.

See also