Document Loop

The document loop process, cache and display products, categories, contents and folders documents.

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

Important informations :

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

Global arguments

Argument Description

Determine if loop is use in backend context.

default : false

example : backend_context="on"


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

default : false

example : force_return="on"


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)


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

default : 0

example : offset="1"


The page to display.

example : page="2"

Loop arguments

Argument Description
brand **

a brand identifier. The loop will return this brand's documents

example : brand="2"

category **

a category identifier. The loop will return this category's documents

example : category="2"

content **

a content identifier. The loop will return this content's documents

example : content="2"


A single or a comma-separated list of document IDs to exclude from the list.

example : exclude="456,123"

folder **

a folder identifier. The loop will return this folder's documents

example : folder="2"


A single or a list of document ids.

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


A language identifier, to specify the language in which the document information will be returned


A list of values

Expected values :
  • alpha : alphabetical order on title
  • alpha-reverse : reverse alphabetical order on title
  • manual : order by ascending position
  • manual-reverse : order by descending position
  • random : return documents in pseudo-random order

default : manual

example : order="alpha_reverse"

product **

a product identifier. The loop will return this product's documents

example : product="2"

source **

Expected values :
  • brand
  • category
  • content
  • folder
  • product

example : source="category"


The identifier of the object provided in the "source" parameter. Only considered if the "source" argument is present

example : source_id="2"


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 Document
$UPDATE_DATE The last modification date of this Document

Loop outputs

Variable Description
$CHAPO the document chapo
$DESCRIPTION the document description
$DOCUMENT_PATH The absolute path to the generated document file
$DOCUMENT_URL The absolute URL to the generated document
$ID the document ID
$LOCALE the locale
$OBJECT_ID The object ID
$OBJECT_TYPE The object type (e.g., produc, category, etc. see 'source' parameter for possible values)
$ORIGINAL_DOCUMENT_PATH The absolute path to the original document file
$POSITION the position of this document in the object's document list
$POSTSCRIPTUM the document postscriptum
$TITLE the document title
$VISIBLE true if the document is visible. False otherwise