Ecom:Product.ImageMedium
Version: 8.6.1 stringSummary
Returns a medium size image for the current product.
Settings
The value is based on the Medium image input field under the Media tab for a product.
(Ecommerce > Product Catalog > Product group/product > Media tab > Media panel)
Remarks
The value is returned as a HTML code snippet containing an <img>
tag.
The tags is removed or not used if Improved image patterns feature is enabled.
Examples
Outputting the template tag
@GetString("Ecom:Product.ImageMedium")
Check if tag has a value
@if(!string.IsNullOrWhiteSpace(GetString("Ecom:Product.ImageMedium"))) {
@* Tag has value, so let's do something useful here. *@
}
Assign tag to a value for later use
@{
string storedTag = GetString("Ecom:Product.ImageMedium");
}
Outputting the template tag
<!--@Ecom:Product.ImageMedium-->
Check if string has a value
<!--@If Defined(@Ecom:Product.ImageMedium)-->
Let's output this tag here: <strong><!--@Ecom:Product.ImageMedium--></strong>
<!--@EndIf(@Ecom:Product.ImageMedium)-->