Prints product images in a thumbnail size.
Kuvaus
If a product has only one image, it can be excluded from the thumbnail list by using the attribute
. In such case, the product's only image won't be unnecessarily displayed both as the main image and on the thumbnail list.showall:
false
Syntaksi
{ProductThumbnails(
imagesize: string,
width: string,
height: string,
showall: boolean,
helper: string
)}
Näkyvyys
Toimii näkyvyydessä: tuote
The required scope is always set in the following templates:
Templates |
---|
Single product template |
Product images |
Printing product images on the product card
This example shows one of the ways in which product images can be printed on the online store's product page.
In the MyCashflow default theme, product images are printed by using the {ProductImages}
tag, which prints the product's all images.
<div id="ProductImages">
<figure class="main-image">
{ProductImage}
<figcaption>
{ProductImageCaption}
</figcaption>
</figure>
{ProductThumbnails}
</div>
The product's main image is printed by using the {ProductImage}
tag.
Attribuutit
imagesize:
Defines printed image's dimensions.
The used values are determined by the values of the
ImageSizes
element of the theme settings.Allowed values: names of image sizes defined in the theme.xml file's
ImageSizes
element.E.g.
imagesize:
'Large'height:
Defines image height given in pixels.
Allowed values:integers
width:
Defines image width given in pixels.
Allowed values:integers
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.showall:
If the attribute's value is false, it will prevent the thumbnail list from being printed if there is just one product image.
Allowed values: true/false. The default value is false.
after/before:
By using the
after
andbefore
attributes you can define content that is output either after or before the tag's output.Allowed values:The HTML and Interface markup
E.g.
before:
'<p>Tämä merkkaus näkyy ennen tagin omaa sisältöä.</p>'after:
'<p>Tämä taas näkyy tagin oman sisällön jälkeen.</p>'
If the tag does not produce any content, neither the content of the
after
andbefore
attributes will be output.or:
Defines alternative content that is displayed if the tag itself does not produce any content.
Allowed values:The HTML and Interface markup
E.g.
or:
'Sisältöä ei löytynyt.'