Item.Area.Field.IsRequired
Version: - booleanSummary
Returns True if the website item field is marked as required - otherwise False.
Settings
The value is based on the Required field in the item field settings.
(Management Center - Item types - Item type - Item field - Required)
Examples
Outputting the template tag
@GetBoolean("Item.Area.Field.IsRequired")
Check if tag has a value
@if(!bool.IsNullOrWhiteSpace(GetBoolean("Item.Area.Field.IsRequired"))) {
@* Tag has value, so let's do something useful here. *@
}
Assign tag to a value for later use
@{
bool storedTag = GetBoolean("Item.Area.Field.IsRequired");
}
Outputting the template tag
<!--@Item.Area.Field.IsRequired-->
Check if boolean has a value
<!--@If Defined(@Item.Area.Field.IsRequired)-->
Let's output this tag here: <strong><!--@Item.Area.Field.IsRequired--></strong>
<!--@EndIf(@Item.Area.Field.IsRequired)-->