Skip to main content
Skip table of contents

Comment

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

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

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.

(warning) 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: pattern

  • Type: string

$comment.creationDate(pattern, locale)

String

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

  • Parameter: pattern

  • Type: string

-

  • Parameter: locale

  • Type: 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: pattern

  • Type: string


$comment.lastModificationDate(pattern, locale)

String

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

  • Parameter: pattern

  • Type: string

-

  • Parameter: locale

  • Type: string


$comment.lastModifier

User

The user who last modified the comment.

$comment.renderContent()

String

The rendered content of the comment.


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.