ItemPublisher:Item.Fields
Summary
The ItemPublisher:Item.Fields
loop 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
ItemPublisher:Global.PageId
Returns the ID
of the current page in the list.
@GetInteger("ItemPublisher:Global.PageId")
ItemPublisher:Global.PagingPosition
Returns the number of the current page according to paging position.
@GetInteger("ItemPublisher:Global.PagingPosition")
ItemPublisher:Global.ParagraphId
Returns the ID
of the paragraph.
@GetInteger("ItemPublisher:Global.ParagraphId")
ItemPublisher:Item.CanEdit
Returns True
if "Allow editing of items" is enabled in paragraph settings for the module.
@GetBoolean("ItemPublisher:Item.CanEdit")
ItemPublisher:Item.Field.Control
Returns control type of the item field, based on the Type filed in the item field definition.
@GetString("ItemPublisher:Item.Field.Control")
ItemPublisher:Item.Field.Description
Returns description of the item field, based on the Description filed in the item field definition.
@GetString("ItemPublisher:Item.Field.Description")
ItemPublisher:Item.Field.First
Returns True if the item field is the first on the list.
@GetBoolean("ItemPublisher:Item.Field.First")
ItemPublisher:Item.Field.IsRequired
Returns true if the field is required, based on current state of Required check-box in the item field definition.
@GetString("ItemPublisher:Item.Field.IsRequired")
ItemPublisher:Item.Field.Last
Returns True
if the item field is the last on the list.
@GetBoolean("ItemPublisher:Item.Field.Last")
ItemPublisher:Item.Field.Name
Returns the name of the item field.
@GetString("ItemPublisher:Item.Field.Name")
ItemPublisher:Item.Field.SystemName
Returns the system name of the item field.
@GetObject("ItemPublisher:Item.Field.SystemName")
ItemPublisher:Item.Field.Type
Returns the type of the item field.
@GetObject("ItemPublisher:Item.Field.Type")
ItemPublisher:Item.Field.Value
Return the content of the item field.
@GetObject("ItemPublisher:Item.Field.Value")
Available loops
ItemPublisher:Item.Field.Options
The ItemPublisher:Item.Field.Options loop lets you display various information about fields optons.
@foreach (LoopItem item in GetLoop("ItemPublisher:Item.Field.Options")){ <p>@item.GetValue("TagName")</p> }
ItemPublisher:Item.Field.Validators
The ItemPublisher:Item.Field.Validators
loop lets you display various information about field valdiation error.
@foreach (LoopItem item in GetLoop("ItemPublisher:Item.Field.Validators")){ <p>@item.GetValue("TagName")</p> }