Handling Disabled Comments

Front End
Version 1.5.8+
1 min read

You are viewing the documentation for Meerkat version 1 for Statamic 2. The latest version is Meerkat 2 for Statamic 3.

Read v2 docs

Since it is possible for Meerkat to disable new comment submissions for any given post on your site, it might be a good idea to have your website's theme adapt and display a message to visitors.

Checking if Comments are Disabled

It is relatively simple to check if new comment submissions are disabled for the current post using the {{ meerkat:comments-enabled }} tag. This tag can be used inside of a conditional statement like so:

{{ if {meerkat:comments-enabled} }}
	{{# Render comment form. #}}
{{ else }}
	<p>New comment submissions have been disabled for this post.</p>
{{ /if }}

That's all there is to updating your theme to display a message to visitor's that new comment submissions have been disabled. Meerkat will handle the rest in the background for you.