Prints the URL address of a banner image.

Kuvaus

You can print the banner image in a ready <img> element by using the {BannerImage} tag.

If you use image size attributes width, height, or imagesize, the product image will appear to the visitor as resized corresponding to the size specification of the attribute.

If a banner doesn't have an image, the URL address of the image defined as noImage in theme settings will be printed instead.

The global or attribute is not available for this tag.

Syntaksi

{BannerImageURL( id: int, name: string, imagesize: string, height: int, width: int )}

Näkyvyys

Toimii näkyvyydessä: banneri

You can use the tag as a global tag or in the helper attribute of the {Banner} and {Banners} tags.

If you use the tag globally, select a banner by setting a value either to the id or name attribute.

Attribuutit

id:

The banner's ID number.

The banner ID number can be found in a browser's address bar when the banner is being edited or viewed in the admin panel.

Allowed values: the banner's ID number expressed as an integer

name:

The banner's codename.

The codename can be found in the banner details in the admin panel.

Allowed values: the banner's codename expressed as a string

imagesize:

Defines printed image's dimensions.

The values to be used are determined based on the values of the theme settingsImageSizes element.

Allowed values: Names of image sizes defined in the ImageSizes element of the theme.xml file

E.g. imagesize:'Large'

height:

Defines image height given in pixels.

Allowed values: integers.

width:

Defines image width given in pixels.

Allowed values: integers.

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.