This placeholder represents a comment on a page or blog post.

List all comments

#foreach($comment in $page.comments)
    <p>$comment.content</p>
#end
XML

For a full example see our comment recipe: Displaying and Adding User Comments

Methods

Name Type Description
$comment.author String

The username of the comment author.

Deprecation Notice: Use creator.username instead.

$comment.children List<Comment>

A list of "children comments", which are replies to the current comment.

$comment.content String

The rendered content of the comment.

$comment.creationDate Date

The creation date of the comment.

$comment.creationDate(pattern) String

The creation date of the comment, formatted using the given pattern.

Parameter Type Description
pattern String
$comment.creationDate(pattern, locale) String

The creation date of the comment, formatted using the given pattern and locale.

Parameter Type Description
pattern String
locale String
$comment.creator User

The user who created the comment.

$comment.id String

The ID of the comment, to be used for replies.

$comment.lastModificationDate Date

The last modification date of the comment.

$comment.lastModificationDate(pattern) String

The last modification date of the comment, formatted using the given pattern.

Parameter Type Description
pattern String
$comment.lastModificationDate(pattern, locale) String

The last modification date of the comment, formatted using the given pattern and locale.

Parameter Type Description
pattern String
locale String
$comment.lastModifier User

The user who last modified the comment.

$comment.renderContent() String

The rendered content of the comment.