We're off to DotAll 2022 in Brooklyn NY (plus a little extra sightseeing time). Our support will be limited.

Comment Element#

You can access comments from your templates via craft.comments.all which returns an ElementCriteriaModel (opens new window) object.

{% set comments = craft.comments.all({
    userId: currentUser.id,
    limit: 10,
    status: 'pending'
}) %}

{% for comment in comments %}
    {{ comment.comment }}
{% endfor %}

Parameters#

craft.comments.all supports the following parameters:

ParameterDescription
elementId
elementType
userId
status
name
email
url
ipAddress
userAgent
comment
order

Previous ← Example CSS JS Next Comment Model →

Get started with Comments

Available for Craft 4. Get it from the plugin store.