Prints a list of products from the active product category.

Kuvaus

By default, the tag prints the following information for each product:

The tag also accepts values from the address bar, making it compatible with, for example, product filters.

The {ProductSet} tag has replaced the use of the {Products} tag for printing an un-initialized list.

The {Products} tag is now limited to printing the products of the active product category. Most of the old attributes of the tag have been deprecated.

With the new {ProductSet} tag, you can create a flexible product list, defining its content and formatting as needed with attributes.

Syntaksi

{Products( type: string, list_type: string, list_classes: string, classes: string, helper: string )}

Näkyvyys

Toimii näkyvyydessä: globaali

Näkyvyyshelper-attribuutissa: tuote

It is possible to use global visibility tags in any page template and within any tag.

Attribuutit

type:

Determines the markup type of the output list.

Sallitut arvot:
  • 'normal': Each item in the list is its own div element. The list does not have a surrounding element.
  • 'list': The list is printed as an HTML list. By using the list_type attribute, you can define the type of list.
list_type:

Determines whether the product list is printed as an unordered or ordered (numbered) list.

The attribute is enabled only if the type attribute's value is 'list'.

Sallitut arvot:
  • 'ul': the product list is printed as an unordered list
  • 'ol': the product list is printed as an ordered list
list_classes:

Class names given to any list element that contains a list (<ul> or <ol>, depending on the value of the list_type attribute).

The attribute is enabled only if the type attribute's value is 'list'.

Allowed values: space-separated class names as strings.

E.g. list_classes:'firstClass secondClass'

classes:

Class names that are given to every list element.

Allowed values: class names as strings.

Use space characters to separate the classes that are to be given to the same element. Use pipes to separate the classes that are to be given to different list elements.

E.g. classes:'firstClass secondClass | everyOthersClass everyOthersSecondClass'

See also detailed instructions on how to define list class names.

helper:

Defines the content and output format of a single list element.

Allowed values: the Interface and HTML markup that define the output's markup and content.

The helper attribute can be used in two ways:

  • you can indicate the desired markup directly as the attribute's value, or
  • you can indicate a reference to a file with the desired markup as the attribute's value. The reference should be indicated in relation to the theme's root directory.

See also detailed instructions on using the helper attribute.

before/after:

With the before and after attributes, you can define content that is output before or after the content produced by the tag.

Allowed values: text that may contain HTML and Interface markup.

E.g.

  • before: '<p>This markup appears before the tag's own content.</p>'.
  • after: '<p>This appears after the tag's own content.</p>'

If the tag does not produce any content, the content of the before and after attributes will also not be displayed.

escape:

Adds an escape character before quotation marks in the output. The attribute makes it easier to process the tag-produced content when using JavaScript.

Allowed values: true/false. The default value is false.

or:

Defines alternative content that is displayed if the tag itself does not produce any content.

Allowed values: text that may contain HTML and Interface markup.

E.g. or:'Content not found.'