Version: - string  


Returns the canonical value for the product.


The value is based on the Canonical field in the Meta information section for a product.

(Ecommerce > Product Catalog > Shop > Product group > Product > Details > Meta information - Canonical)


The value from the canonical field on the product is rendered if Canonical link in meta checkbox is enabled in Management center - Web and Http - Customized URLs - Ecommerce.


Outputting the template tag


Check if tag has a value

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

Assign tag to a value for later use

@{ string storedTag = GetString("Ecom:Product.Canonical"); }

Outputting the template tag


Check if string has a value

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