Skip to main content

Document

The document loop process, cache and display products, categories, contents and folders documents.
{loop type="document" name="the-loop-name" [argument="value"], [...]}

Arguments

ArgumentDescriptionDefaultExample
brand **a brand identifier. The loop will return this brand's documentsyescurrent="false"
category **a category identifier. The loop will return this category's documentscategory="2"
content **a content identifier. The loop will return this content's documentscontent="2"
excludeA single or a comma-separated list of document IDs to exclude from the list.exclude="456,123"
folder **a folder identifier. The loop will return this folder's documentsfolder="2"
idA single or a list of document ids.id="2", id="1,4,7"
langA language identifier, to specify the language in which the document information will be returned
orderA list of values see sorting possible valuesmanualorder="alpha_reverse"
product **a product identifier. The loop will return this product's documentsproduct="2"
source **see Expected valuessource="category"
source_idThe identifier of the object provided in the "source" parameter. Only considered if the "source" argument is presentsource_id="2"
visibleA boolean value.yesvisible="no"

Plus the global arguments

Outputs

VariableValue
$CHAPOthe document chapo
$DESCRIPTIONthe document description
$DOCUMENT_PATHThe absolute path to the generated document file
$DOCUMENT_URLThe absolute URL to the generated document
$IDthe document ID
$LOCALEthe locale
$OBJECT_IDThe object ID
$OBJECT_TYPEThe object type (e.g., produc, category, etc. see 'source' parameter for possible values)
$ORIGINAL_DOCUMENT_PATHThe absolute path to the original document file
$POSITIONthe position of this document in the object's document list
$POSTSCRIPTUMthe document postscriptum
$TITLEthe document title
$VISIBLEtrue if the document is visible. False otherwise

Plus the global outputs

Order possible values

Arguments

Ascending valueDescending valueSorted fields
alphaalpha-reversetitle
manualmanual-reverseposition
randompseudo-random order

Souce expected values

Arguments

value
brand
category
content
folder
product