Option.Value
Version: - stringSummary
Returns the value of the list option.
Settings
The value is based on the Value field in the list options.
(Modules > Forms for editors > Form > Edit list field > Options > Edit option > Value)
Examples
Outputting the template tag
@GetString("Option.Value")
Check if tag has a value
@if(!string.IsNullOrWhiteSpace(GetString("Option.Value"))) {
@* Tag has value, so let's do something useful here. *@
}
Assign tag to a value for later use
@{
string storedTag = GetString("Option.Value");
}
Outputting the template tag
<!--@Option.Value-->
Check if string has a value
<!--@If Defined(@Option.Value)-->
Let's output this tag here: <strong><!--@Option.Value--></strong>
<!--@EndIf(@Option.Value)-->