Skip to Content

Comment

The comment object describes an article comment, including its content, author, and metadata.

Usage Example

{%- comment -%} List all comments for an article {%- endcomment -%} <ul> {% for comment in article.comments %} <li> <strong>{{ comment.author }}</strong>: {{ comment.comment }}<br> <small>Posted on {{ comment.created_at | date: '%Y-%m-%d' }}</small> {% if comment.is_author %}<span> (Author)</span>{% endif %} </li> {% endfor %} </ul>

Properties

id

Returns the unique id for this comment.

customer

Return the customer associated with comment if any.

is_author

Tells if the comment poster was the blog author.

parent_count

Returns the amount of parent comments

comments

Retrieve the comments made to this comment

comment

Retrieve the actual comment.

created_at

Returns the timestamp when the comment was created.

updated_at

Returns the timestamp when the comment was updated or modified.