The comment object

The comment object has the following attributes:

comment.author

Returns the author of the comment.

comment.content

Returns the content of the comment.

comment.created_at

Returns the timestamp of when the comment was submitted.

Use the date filter to convert the timestamp into a more readable format.

Input

{{ comment.created_at | date: "%b %d, %Y" }}

Output

Feb 26, 2017

comment.email

Returns the e-mail address of the comment's author.

comment.id

Returns the id (unique identifier) of the comment.

comment.status

Returns the status of the comment. The possible values are:

  • pending: The comment is awaiting either spam detection or moderation if the blog is moderated.
  • published: The comment is published and visible to the public. It passed spam detection and, if the blog is moderated, was approved.
  • removed: The comment was removed by the shop owner.
  • spam: The comment is marked as spam by Shopify's spam detection.
  • unapproved: The comment is awaiting approval by the shop owner.

Only comments with the status of published are returned in the article.comments object.

comment.updated_at

Returns the timestamp of when the comment's status was last changed. For example, the timestamp of when a comment was approved by the article's author.

Use the date filter to convert the timestamp into a more readable format.

comment.url

Returns the URL of the article with comment.id appended to it. This is so the page will automatically scroll to the comment.