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