Brand Loop

Brand loop lists brands defined in your shop.

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

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
current

A boolean value which allows either to exclude current brand from results, or match only this brand

example : current="yes"

id

A single or a list of brand ids.

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

order

A list of values

Expected values :
  • alpha : alphabetical order on title
  • alpha-reverse : reverse alphabetical order on title
  • created : ascending order on date of brand creation
  • created-reverse : descending order on date of brand creation
  • id : ID order
  • id-reverse : reverse ID order
  • manual : ascending order position
  • manual-reverse : descending order position
  • random : randomized order
  • updated : ascending order on date of brand update
  • updated-reverse : descending order on date of brand update

default : manual

example : order="random"

product

A single product id.

example : product="2"

return_url
Thelia >= 2.3

A boolean value which allows the urls generation.

default : yes

example : return_url="no"

title

A title string

example : title="foo"

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

Loop outputs

Variable Description
$CHAPO the brand chapo
$DESCRIPTION the brand description
$HAS_NEXT >= 2.3 true if a brand exists after this one, following brands positions. Only available if with_prev_next_info parameter is set to true
$HAS_PREVIOUS >= 2.3 true if a brand exists before this one following brands positions. Only available if with_prev_next_info parameter is set to true
$ID the brand id
$IS_TRANSLATED check if the brand is translated
$LOCALE The locale used for this research
$LOGO_IMAGE_ID ID of the brand logo image, among the brand images
$META_DESCRIPTION the brand meta description
$META_KEYWORDS the brand meta keywords
$META_TITLE the brand meta title
$NEXT >= 2.3 The ID of brand after this one, following brands positions, or null if none exists. Only available if with_prev_next_info parameter is set to true
$POSITION the brand position
$POSTSCRIPTUM the brand postscriptum
$PREVIOUS >= 2.3 The ID of brand before this one, following brands positions, or null if none exists. Only available if with_prev_next_info parameter is set to true
$TITLE the brand title
$URL the brand URL
$VISIBLE true if the product is visible or not, false otherwise