Version: 8.6.1 string  


Returns a product image in the size pattern that's defined in paragraph settings.


The value is based on the user defined pattern input field under the paragraph settings.

(Page > Paragraph > Module tab > User defined patterns)


If the pattern name is "Alt_1" then the template tag is named like this @Ecom:Product.ImageAlt_1.

The tags is removed or not used if Improved image patterns feature is enabled.


Outputting the template tag


Check if tag has a value

@if(!string.IsNullOrWhiteSpace(GetString("Ecom:Product.Image[PatternName]"))) { @* Tag has value, so let's do something useful here. *@ }

Assign tag to a value for later use

@{ string storedTag = GetString("Ecom:Product.Image[PatternName]"); }

Outputting the template tag


Check if string has a value

<!--@If Defined(@Ecom:Product.Image[PatternName])--> Let's output this tag here: <strong><!--@Ecom:Product.Image[PatternName]--></strong> <!--@EndIf(@Ecom:Product.Image[PatternName])-->