Skip to main content

Folder

Folder loop lists folders from your shop.
{loop type="folder" name="the-loop-name" [argument="value"], [...]}

Arguments

ArgumentDescriptionDefaultExample
contentA single content id.content="3"
content_count_visibleThis parameter controls how content is counted. If 'yes' (the default) only visible contents are counted, 'no': only hidden contents are counted, '*': all contents are counted.yescontent_count_visible="*"
currentA boolean value which allows either to exclude current folder from results either to match only this foldercurrent="yes"
excludeA single or a list of folder ids.exclude="2", exclude="1,4,7"
idA single or a list of folder ids.id="2", id="1,4,7"
langA lang idlang="1"
need_content_countA boolean. If set to true, the loop will return the number of contents in each folder and its sub-folderstrue (for backward-compatibility)need_content_count="yes"
need_count_childA boolean. If set to true, the loop will return the number of sub-folders of each foldertrue (for backward-compatibility)need_count_child="yes"
not_empty(not implemented yet) A boolean value. If true, only the folders which contains at leat a visible content (either directly or trough a subfolder) are returnednonot_empty="yes"
orderA list of values see sorting possible valuesmanualorder="random"
parentA single folder id.folder="3"
return_urlA boolean value which allows the urls generation.yesreturn_url="no"
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'other
$CHAPOthe folder chapo
$CHILD_COUNTNumber of subfolders contained by the current forlder.Only available if need_count_child parameter is set to true
$CONTENT_COUNTthe number of visible contents for this folder.Only available if need_content_count parameter is set to true
$CREATE_DATEthe folder create date
$DESCRIPTIONthe folder description
$HAS_NEXTtrue if a folder exists after this one in the current parent folder, following folders positions.🚫
$HAS_PREVIOUStrue if a folder exists before this one in the current parent folder, following folders positions.🚫
$IDthe folder id
$IS_TRANSLATEDcheck if the folder is translated
$LOCALEThe locale used for this research
$META_DESCRIPTIONthe folder meta description
$META_KEYWORDSthe folder meta keywords
$META_TITLEthe folder meta title
$NEXTThe ID of folder after this one in the current parent folder, following folders positions, or null if none exists.🚫
$PARENTthe parent folder
$POSITIONthe folder position
$POSTSCRIPTUMthe folder postscriptum
$PREVIOUSThe ID of folder before this one in the current parent folder, following folders positions, or null if none exists.🚫
$TITLEthe folder title
$UPDATE_DATEthe folder update date
$URLthe folder URL
$VERSIONthe folder version
$VERSION_AUTHORthe folder version author
$VERSION_DATEthe folder version date
$VISIBLEthe folder visibility

Plus the global outputs

Order possible values

Arguments

Ascending valueDescending valueSorted fields
alphaalpha_reversetitle
createdcreated_reversedate of content creation
idid_reverseid
manualmanual_reverseposition
randomfolders in random order
updatedupdated_reversedate of content update
visiblevisible_reverseitems