{# you may set options when using this partial. Example: include 'partials/recentcomments.html.twig' with {'limit': 5, 'pages_limit': 3} #} {% if grav.twig.enable_comments_plugin %}

{{'PLUGIN_COMMENTS.COMMENTS_STATS'|t}}

{% set stats = recent_comments(limit|default(5), pages_limit|default(3)) %} {% if stats.global_stats.active_entries %} {{stats.global_stats.active_entries}} ( {{stats.global_stats.deleted_entries}}) - {{stats.global_stats.active_comments}} ( {{stats.global_stats.deleted_comments}}) - {{stats.global_stats.active_replies}} ( {{stats.global_stats.deleted_replies}}) - {{stats.global_stats.pages_with_active_entries}} {% endif %} {% for key, entry in stats.pages %} {% if loop.first %}

{{'PLUGIN_COMMENTS.RECENT_PAGES'|t}} (limit {{stats.options.pages_limit}})

{% endif %} {% endfor %} {% for key, entry in stats.comments %} {% if loop.first %}

{{'PLUGIN_COMMENTS.RECENT_COMMENTS'|t}} (limit {{stats.options.comments_limit}})

{% endif %} {% endfor %} {% endif %}