ItemPublisher:ItemType.Fields
Summary
The ItemPublisher:ItemType.Fields
loop lets you display various information about the item type 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
ItemPublisher:ItemType.CanEdit
Returns True if "Allow editing of items" is enabled in paragraph settings for the module.
@GetBoolean("ItemPublisher:ItemType.CanEdit")
ItemPublisher:ItemType.Field.DefaultValue
Returns the default value for the item field.
@GetString("ItemPublisher:ItemType.Field.DefaultValue")
ItemPublisher:ItemType.Field.First
Returns True if the field is the first in the item field list.
@GetBoolean("ItemPublisher:ItemType.Field.First")
ItemPublisher:ItemType.Field.Last
Returns True if the field is the last in the item field list.
@GetBoolean("ItemPublisher:ItemType.Field.Last")
ItemPublisher:ItemType.Field.Name
Returns the name of the item field.
@GetString("ItemPublisher:ItemType.Field.Name")
ItemPublisher:ItemType.Field.SystemName
Returns the system name of the item field.
@GetString("ItemPublisher:ItemType.Field.SystemName")
ItemPublisher:ItemType.Field.Type
Returns the type of the item field, e.g. File, Text.
@GetString("ItemPublisher:ItemType.Field.Type")
Available loops
ItemPublisher:ItemType.Field.Options
The ItemPublisher:ItemType.Field.Options loop lets you display various information about the options for list field types.
@foreach (LoopItem item in GetLoop("ItemPublisher:ItemType.Field.Options")){ <p>@item.GetValue("TagName")</p> }