Comment iterator
Iterate over the comments returned by a call to Comments (place element inside a ugc:Comments element).
| Language | Command |
|---|---|
| ASP.NET Server Control | <ugc:ForEachComment runat="server"> |
| JSP Custom Tag | <ugc:ForEachComment> |
| TCDL tag | <tcdl:ForEachComment> |
Return values
For each comment, information is returned in an object that contains the following fields:
content- The content of the submitted comment.
moderator- The moderator who moderated this comment (value 'null' if the comment was not (yet) moderated).
moderatedDate- The date and time at which the comment was moderated the last time (value 'null' if it was not (yet) moderated).
score- The Comment Score (upvotes minus downvotes) that this comment received.
status-
The status of the comment, which is one of the following:
Submitted- A submitted comment. In a moderated environment, this comment is pending moderation; in an unmoderated environment, it is on the Web site.
FlaggedForModeration- A comment that has been downvoted below the configured threshold.
Posted- A comment that was moderated and approved, and is now live on the Web site
Rejected- A comment that the moderator rejected.
FlaggedForDeletion- A comment that the visitor who submitted it, or a moderator, requested to be deleted.
Resubmitted- A comment that the visitor who submitted it changed and resubmitted.
id- The unique identifier of the comment.
creationDate- The date and time at which the comment was created.
lastModifiedDate- The date and time at which the comment was last modified.
user- The identity of the visitor who submitted this comment, if known; otherwise the value of the cookie by which the anonymous visitor is identified.
Attributes
| Attribute name (JSP or TCDL) | Description |
|---|---|
var (JSP or TCDL) or Var (ASP.NET) | (optional) Your custom name for the variable that iterates over comments in the array. Defaults to ugcComment. |
comments (JSP or TCDL) or Comments (ASP.NET) | (optional) Your custom name for the variable that represents the array of retrieved comments. Defaults to ugcComments. If you set the var attribute in the <ugc:Comments> tag to a value (say myComments), you must set this attribute to a corresponding value (in this example, ${myComments}). |