Ecom:Product.Link.PID
Version: - stringSummary
Returns a link (containing the Paragraph ID) to the current product.
Settings
The value is generated automatically.
Remarks
The value is returned as a HTML code snippet containing an <a>
tag.
The link text is the name of the product.
Examples
Outputting the template tag
@GetString("Ecom:Product.Link.PID")
Check if tag has a value
@if(!string.IsNullOrWhiteSpace(GetString("Ecom:Product.Link.PID"))) {
@* Tag has value, so let's do something useful here. *@
}
Assign tag to a value for later use
@{
string storedTag = GetString("Ecom:Product.Link.PID");
}
Outputting the template tag
<!--@Ecom:Product.Link.PID-->
Check if string has a value
<!--@If Defined(@Ecom:Product.Link.PID)-->
Let's output this tag here: <strong><!--@Ecom:Product.Link.PID--></strong>
<!--@EndIf(@Ecom:Product.Link.PID)-->