Integrating With the Control Panel

Front End
Version 1.5.8+
2 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

Meerkat allows theme developers to integrate their comment feeds into the Control Panel. Every comment within the Control Panel Comment Manager provides a way to jump to that comment on the page (this feature is emphasized by the green arrow in the image below):

While useful, this feature will not work completely unless there is special markup included in your site's them. Essentially, we need to include a hidden anchor that Meerkat will link to automatically when the "View Post" feature is activated. Don't worry - it is not as complicated as it might sound.

Meerkat provides a useful tag ({{ meerkat:cp-link }}) for generating this hidden anchor markup for you; just place it anywhere within your comment to integrate with the Control Panel:

{{ meerkat:responses }}
    <div class="media">
        <div class="media-body">
            <h4 class="media-heading">
                {{ meerkat:cp-link }}
                {{ name }}
            </h4>
            {{ comment }}
        </div>
    </div>
{{ /meerkat:responses }}

Manually Creating the Markup

If you want to manually create the markup for this, just make sure that your generated HTML contains the string comment- following by the comment's ID:

<a name="comment-{{ id }}"></a>