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