[TemplateTag].Template
Version: - stringSummary
Returns the template tag for the custom product field.
Settings
The value is based on the Template Tag field under the product field settings.
(Management Center > Ecommerce > Product catalog > Product fields > Product field > Template Tag)
Examples
Outputting the template tag
@GetString("[TemplateTag].Template")
Check if tag has a value
@if(!string.IsNullOrWhiteSpace(GetString("[TemplateTag].Template"))) {
@* Tag has value, so let's do something useful here. *@
}
Assign tag to a value for later use
@{
string storedTag = GetString("[TemplateTag].Template");
}
Outputting the template tag
<!--@[TemplateTag].Template-->
Check if string has a value
<!--@If Defined(@[TemplateTag].Template)-->
Let's output this tag here: <strong><!--@[TemplateTag].Template--></strong>
<!--@EndIf(@[TemplateTag].Template)-->