FieldName
Version: - stringSummary
Returns the name of the custom field.
Settings
The value is based on the Name field in the news custom field settings.
(Management Center > Control Panel > News > Edit Custom fields -> Custom field -> Name)
Examples
Outputting the template tag
@GetString("FieldName")
Check if tag has a value
@if(!string.IsNullOrWhiteSpace(GetString("FieldName"))) {
@* Tag has value, so let's do something useful here. *@
}
Assign tag to a value for later use
@{
string storedTag = GetString("FieldName");
}
Outputting the template tag
<!--@FieldName-->
Check if string has a value
<!--@If Defined(@FieldName)-->
Let's output this tag here: <strong><!--@FieldName--></strong>
<!--@EndIf(@FieldName)-->