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

comment

Returns the actual comment content.

comments

Returns the replies (child comments) to this comment.

created_at

Returns the timestamp when the comment was created.

customer

Returns the customer associated with the comment, if any.

id

Returns the unique id for this comment.

is_author

Returns true if the comment poster was the blog author.

parent_count

Returns the number of parent comments.

updated_at

Returns the timestamp when the comment was updated or modified.

Last updated on