Feature Loop

Feature loop lists features.

{loop type="feature" name="the-loop-name" [argument="value"], [...]}

Important informations :

* : argument is required
** : at least one of ** marked argument is required

Global arguments

Argument Description
backend_context

Determine if loop is use in backend context.

default : false

example : backend_context="on"

force_return

force return result for i18n tables even if there is no record

default : false

example : force_return="on"

limit

The maximum number of results to display.

example : limit="10"

name *

The loop name. This name must be unique and is used to reference this loop further in the page (see ifloop, elseloop or pageloop)

offset

The first product to display offset. Will not be used if `page` argument is set.

default : 0

example : offset="1"

page

The page to display.

example : page="2"

Loop arguments

Argument Description
exclude

A single or a list of feature ids to exclude.

example : exclude="456,123"

exclude_template

A single or a list of template ids. Only features NOT attached to these templates will be returned.

example : id="2", id="1,4,7"

id

A single or a list of feature ids.

example : id="2", id="1,4,7"

lang

A lang id

example : lang="1"

order

A list of values

Expected values :
  • alpha : alphabetical order on title
  • alpha_reverse : reverse alphabetical order on title
  • manual
  • manual_reverse

default : manual

example : order="alpha_reverse"

product

A single or a list of product ids.

example : id="2", id="1,4,7"

template

A single or a list of template ids. Only features attached to these templates will be returned.

example : id="2", id="1,4,7"

title

A a string title

example : title="foo"

visible

A boolean value.

default : yes

example : visible="no"

Global outputs

Variable Description
$LOOP_COUNT the current results index, starting from 1
$LOOP_TOTAL the total number of results returned by the loop
$CREATE_DATE The creation date of this Feature
$UPDATE_DATE The last modification date of this Feature

Loop outputs

Variable Description
$CHAPO the feature chapo
$DESCRIPTION the feature description
$ID the feature id
$IS_TRANSLATED check if the feature is translated
$LOCALE The locale used for this research
$POSITION If none of the product, template or exclude_template parameter is present, $POSITION contains the feature position. Otherwise, it contains the feature position in the product template context.
$POSTSCRIPTUM the feature postscriptum
$TITLE the feature title