Ecom:ProductList.SortBy
Version: - stringSummary
Returns the sort by value.
Settings
The value is based on the Sort by field in the product catalog module settings.
(Page - Paragraph - Module - Display - Sort by)
Examples
Outputting the template tag
@GetString("Ecom:ProductList.SortBy")
Check if tag has a value
@if(!string.IsNullOrWhiteSpace(GetString("Ecom:ProductList.SortBy"))) {
@* Tag has value, so let's do something useful here. *@
}
Assign tag to a value for later use
@{
string storedTag = GetString("Ecom:ProductList.SortBy");
}
Outputting the template tag
<!--@Ecom:ProductList.SortBy-->
Check if string has a value
<!--@If Defined(@Ecom:ProductList.SortBy)-->
Let's output this tag here: <strong><!--@Ecom:ProductList.SortBy--></strong>
<!--@EndIf(@Ecom:ProductList.SortBy)-->