Folder Loop
Folder loop lists folders from your shop.
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" |
Text search arguments
Argument | Description |
---|---|
search_in |
A comma separeted list of field in which the search is performed
Possible values : title, chapo, description, postscriptum
example : search_in="title" |
search_mode |
the search mode : `any_word` (search any word separeted by a space), `sentence` (the sentence, anywhere in the field) or `strict_sentence` (the exact sentence) default : strict_sentence |
search_term |
The term to search example : search_term="my product" |
Loop arguments
Argument | Description |
---|---|
content |
A single content id. example : content="3" |
content_count_visible
Thelia >= 2.4 |
This 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. default : yes example : content_count_visible="*" |
current |
A boolean value which allows either to exclude current folder from results either to match only this folder example : current="yes" |
exclude |
A single or a list of folder ids. example : exclude="2", exclude="1,4,7" |
id |
A single or a list of folder ids. example : id="2", id="1,4,7" |
lang |
A lang id example : lang="1" |
need_content_count
Thelia >= 2.4 |
A boolean. If set to true, the loop will return the number of contents in each folder and its sub-folders default : true (for backward-compatibility) example : need_content_count="yes" |
need_count_child
Thelia >= 2.4 |
A boolean. If set to true, the loop will return the number of sub-folders of each folder default : true (for backward-compatibility) example : 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 returned default : no example : not_empty="yes" |
order |
A list of values
Expected values :
default : manual example : order="random" |
parent |
A single folder id. example : folder="3" |
return_url
Thelia >= 2.3 |
A boolean value which allows the urls generation. default : yes example : return_url="no" |
visible |
A boolean value. default : yes example : visible="no" |
with_prev_next_info
Thelia >= 2.3 |
A boolean. If set to true, $PREVIOUS and $NEXT output arguments are available. default : false example : with_prev_next_info="yes" |
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 Folder |
$UPDATE_DATE | The last modification date of this Folder |
Loop outputs
Variable | Description |
---|---|
$CHAPO | the folder chapo |
$CHILD_COUNT | Number of subfolders contained by the current forlder. Only available if need_count_child parameter is set to true |
$CONTENT_COUNT | the number of visible contents for this folder. Only available if need_content_count parameter is set to true |
$CREATE_DATE | the folder create date |
$DESCRIPTION | the folder description |
$HAS_NEXT >= 2.3 | true if a folder exists after this one in the current parent folder, following folders positions. Only available if with_prev_next_info parameter is set to true |
$HAS_PREVIOUS >= 2.3 | true if a folder exists before this one in the current parent folder, following folders positions. Only available if with_prev_next_info parameter is set to true |
$ID | the folder id |
$IS_TRANSLATED | check if the folder is translated |
$LOCALE | The locale used for this research |
$META_DESCRIPTION | the folder meta description |
$META_KEYWORDS | the folder meta keywords |
$META_TITLE | the folder meta title |
$NEXT >= 2.3 | The ID of folder after this one in the current parent folder, following folders positions, or null if none exists. Only available if with_prev_next_info parameter is set to true |
$PARENT | the parent folder |
$POSITION | the folder position |
$POSTSCRIPTUM | the folder postscriptum |
$PREVIOUS >= 2.3 | The ID of folder before this one in the current parent folder, following folders positions, or null if none exists. Only available if with_prev_next_info parameter is set to true |
$TITLE | the folder title |
$UPDATE_DATE | the folder update date |
$URL | the folder URL |
$VERSION | the folder version |
$VERSION_AUTHOR | the folder version author |
$VERSION_DATE | the folder version date |
$VISIBLE | the folder visibility |