Skip to main content

Content

Content loop lists contents from your shop.
{loop type="content" name="the-loop-name" [argument="value"], [...]}

Arguments

ArgumentDescriptionDefaultExample
currentA boolean value which allows either to exclude current content from results either to match only this contentcurrent="yes"
current_folderA boolean value which allows either to exclude current folder contents from results either to match only current folder contents. If a content is in multiple folders whose one is current it will not be excluded if current_folder="false" but will be included if current_folder="yes"current_folder="yes"
depthA positive integer value which precise how many subfolder levels will be browse. Will not be consider if folder parameter is not set.1depth="2"
excludeA single or a list of content ids.exclude="2", exclude="1,4,7"
exclude_folderA single or a list of folder ids. If a content is in multiple folders which are not all excluded it will not be excluded.exclude_folder="2", exclude_folder="1,4,7"
folderA single or a list of folder ids.folder="3", folder="2,5,8"
folder_defaultA single or a list of default folder ids allowing to retrieve all content having this parameter as default folder.folder_default="2", folder_default="1,4,7"
idA single or a list of content ids.id="2", id="1,4,7"
langA lang idlang="1"
orderA list of values
Expected values
alphaorder="random"
return_urlA boolean value which allows the urls generation.yesreturn_url="no"
titleA title stringtitle="foo"
visibleA boolean value.yesvisible="no"
with_prev_next_infoA boolean. If set to true, $PREVIOUS and $NEXT output arguments are available.falsewith_prev_next_info="yes"

Plus the global arguments and search arguments

Outputs

VariableValueIf with_prev_next_info='true'If with_prev_next_info='false'
$CHAPOthe content chapo
$DEFAULT_FOLDERthe default folder id for the current content
$DESCRIPTIONthe content description
$HAS_NEXTtrue if a content exists after this one in the current folder, following contents positions.🚫
$HAS_PREVIOUStrue if a content exists before this one in the current folder, following contents positions.🚫
$IDthe content id
$IS_TRANSLATEDcheck if the content is translated
$LOCALEThe locale used for this research
$META_DESCRIPTIONthe content meta description
$META_KEYWORDSthe content meta keywords
$META_TITLEthe content meta title
$NEXTThe ID of content after this one in the current folder, following contents positions, or null if none exists.🚫
$POSITIONthe content position
$POSTSCRIPTUMthe content postscriptum
$PREVIOUSThe ID of content before this one in the current folder, following contents positions, or null if none exists.🚫
$TITLEthe content title
$URLthe content URL

Plus the global outputs

Order possible values

Arguments

Ascending valueDescending valueSorted fields
alphaalpha_reversetitle
createdcreated_reversedate of content creation
given_ideturn the same order received in id argument which therefore must be set
idid_reverseID
manualmanual_reverseposition, considering a given folder. folder argument must be set
positionposition_reverseposition, without considering a parent folder
random
updatedupdated_reversedate of content update
visiblevisible_reverseonline/offline items firts