Prints a list of the active product category's products, which can also be used with product filters.

Kuvaus

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

You can use the helper attribute to replace the default information with the product information of your choice and define the HTML markup.

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'

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 these two 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.

between:

Defines the content that the tag prints between each list element.

The attribute enables, for example, formatting a product list as a JSON object by using a comma as the attribute value.

Sallitut arvot: a string and/or HTML/Interface markup
escape:

Adds escape characters to the content printed by the tag, making it easier to use the content in JavaScript code or JSON objects.

Sallitut arvot:
  • true: the attribute adds escape characters before quotation marks
  • false: the attribute does nothing
  • json: the attribute adds escape characters to the output, allowing the content to be used in JSON markup.
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.'