Item.Area.Fields
Summary
The Item.Area.Fields
loop lists all item fields that are available in the item type that is used in website properties and lets you display various information about the item fields.
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.
Check if the loop exists
Example of usage
The following general example illustrates how to use a loop construct.
Check if the loop exists
Available tags
Item.Area.[FieldSystemName]
Return the content of the website item field.
@GetString("Item.Area.[FieldSystemName]")
Item.Area.Field.IsRequired
Returns True if the website item field is marked as required - otherwise False.
@GetBoolean("Item.Area.Field.IsRequired")
Item.Area.Field.Name
Returns the name of the website item field.
@GetString("Item.Area.Field.Name")
Item.Area.Field.SystemName
Returns the system name of the website item field.
@GetString("Item.Area.Field.SystemName")
Item.Area.Field.Type
Returns the type of the website item field, e.g. File, Text.
@GetString("Item.Area.Field.Type")
Item.Area.Field.Value
Returns the content of the website item field.
@GetString("Item.Area.Field.Value")
Available loops
Item.Area.[FieldSystemName].ListOfFiles
The Item.Area.[FieldSystemName].ListOfFiles
loop lists all files that are selected with the Folder item type used in website properties and lets you display various information about the files.
@foreach (LoopItem item in GetLoop("Item.Area.[FieldSystemName].ListOfFiles")){ <p>@item.GetValue("TagName")</p> }
Item.Area.[FieldSystemName].Options
The Item.Area.[FieldSystemName].Options loop lists options that are available with list item types used in website properties and lets you display various information about the options.
@foreach (LoopItem item in GetLoop("Item.Area.[FieldSystemName].Options")){ <p>@item.GetValue("TagName")</p> }
Item.Area.[FieldSystemName].Validators
The Item.Area.[FieldSystemName].Validators
loop lists all validation tags for decimal fields.
@foreach (LoopItem item in GetLoop("Item.Area.[FieldSystemName].Validators")){ <p>@item.GetValue("TagName")</p> }