Ecom:Product.Canonical
Version: - stringSummary
Returns the canonical value for the product.
Settings
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)
Remarks
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.
Examples
Outputting the template tag
@GetString("Ecom:Product.Canonical")
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
<!--@Ecom:Product.Canonical-->
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)-->