QueryResultItem
Summary
The QueryResultItem loop lets you display various information about item the query returns.
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
AppItemUrl
Returns the URL to the app item (e.g. the URL to a thread from the forum app).
@GetString("AppItemUrl")
Forum:FirstAnswer.Author
Return the author of the first answer.
@GetString("Forum:FirstAnswer.Author")
Forum:FirstAnswer.Body
Returns the body text for the first answer.
@GetString("Forum:FirstAnswer.Body")
Forum:FirstAnswer.Created
Returns the date stamp for when the first answer was posted.
@GetDate("Forum:FirstAnswer.Created")
Forum:FirstAnswer.Title
Returns the title of the first answer.
@GetString("Forum:FirstAnswer.Title")
Forum:LastActiveThread.Author
Return the author of the last active thread.
@GetString("Forum:LastActiveThread.Author")
Forum:LastActiveThread.Body
Returns the body text for the last active thread.
@GetString("Forum:LastActiveThread.Body")
Forum:LastActiveThread.Created
Returns the date stamp for when the last active thread was created.
@GetString("Forum:LastActiveThread.Created")
Forum:LastActiveThread.Title
Returns the title of the last active thread.
@GetString("Forum:LastActiveThread.Title")
Forum:LastReply.Author
Return the author of the last reply.
@GetString("Forum:LastReply.Author")
Forum:LastReply.Body
Returns the body text of the last reply.
@GetString("Forum:LastReply.Body")
Forum:LastReply.Created
Returns the timestamp for the last reply.
@GetDate("Forum:LastReply.Created")
Forum:LastReply.Title
Returns the title of the last reply.
@GetString("Forum:LastReply.Title")
Forum:LastThread.Author
Return the author of the last thread.
@GetString("Forum:LastThread.Author")
Forum:LastThread.Body
Returns body text for the last thread.
@GetString("Forum:LastThread.Body")
Forum:LastThread.Created
Returns the timestamps for the creation of the last thread.
@GetDate("Forum:LastThread.Created")
Forum:LastThread.Title
Returns the title of the last thread.
@GetString("Forum:LastThread.Title")
Forum:Thread.Created
Returns the creation timestamp of a forum thread.
@GetDate("Forum:Thread.Created")
Forum:Thread.Replies.Count
Returns a count of the number of replies in a forum thread.
@GetInteger("Forum:Thread.Replies.Count")
Available loops
Properties
The Properties loop lets you display information in each field of query result item.
@foreach (LoopItem item in GetLoop("Properties")){ <p>@item.GetValue("TagName")</p> }