Ecom:VariantOption.Selected
Version: -Summary
Returns True if the variant option is selected in frontend.
Settings
The value is generated automatically.
Examples
Outputting the template tag
@GetObject("Ecom:VariantOption.Selected")
Check if tag has a value
@if(!var.IsNullOrWhiteSpace(GetObject("Ecom:VariantOption.Selected"))) {
@* Tag has value, so let's do something useful here. *@
}
Assign tag to a value for later use
@{
var storedTag = GetObject("Ecom:VariantOption.Selected");
}
Outputting the template tag
<!--@Ecom:VariantOption.Selected-->
Check if object has a value
<!--@If Defined(@Ecom:VariantOption.Selected)-->
Let's output this tag here: <strong><!--@Ecom:VariantOption.Selected--></strong>
<!--@EndIf(@Ecom:VariantOption.Selected)-->