Product.CustomField.Options
Summary
Return list of fields for custom fileds type of list.
Examples
Basic usage
Notice the use of @item.GetValue to get data from the loop variable.
If you just write @GetValue, the data will be taken from outside the loop.
Similarly, you have to use @item.GetLoop to use loops inside a loop.
<table>
<tr>
@foreach (LoopItem item in GetLoop("Product.CustomField.Options") {
<td> @item.GetValue("Relevant.Tag") </td>
}
</tr>
</table>
Check if the loop exists
@if (Loops.Contains("Product.CustomField.Options")) {
...
}
Example of usage
The following general example illustrates how to use a loop construct.
<table>
<!--@LoopStart(Product.CustomField.Options)-->
<tr>
<td><!--@Loop:Tag--></td>
</tr>
<!--LoopEnd(Product.CustomField.Options)-->
</table>
Check if the loop exists
<!--@If LoopDefined(Product.CustomField.Options)-->
...
<!--@EndIf(Product.CustomField.Options)-->
Available tags
Product.CustomField.Option.IsSelected
Returns True if the option is selected
RAZOR
@GetString("Product.CustomField.Option.IsSelected")
Product.CustomField.Option.IsSelectedNumeric
Returns numeric value of the selected option.
RAZOR
@GetString("Product.CustomField.Option.IsSelectedNumeric")
Product.CustomField.Option.Name
Returns name of current option.
RAZOR
@GetString("Product.CustomField.Option.Name")
Product.CustomField.Option.Value
Returns value of current option.
RAZOR
@GetString("Product.CustomField.Option.Value")