Author History

The {{ meerkat:author_history }} tag returns one author's comments for profiles, sidebars, or moderation tools.

#Current user's comments

1{{ if logged_in }}
2 <h3>Your recent comments</h3>
3 {{ meerkat:author_history }}
4 <article>
5 <a href="...">{{ comment_text | truncate:120 }}</a>
6 <small>{{ created_at }}</small>
7 </article>
8 {{ /meerkat:author_history }}
9{{ /if }}
1@auth
2 <h3>Your recent comments</h3>
3 <s-meerkat:author_history>
4 <article>
5 <a href="...">{{ \Illuminate\Support\Str::limit($comment_text, 120) }}</a>
6 <small>{{ $created_at }}</small>
7 </article>
8 </s-meerkat:author_history>
9@endauth

Without identifier, the tag uses the authenticated user's email. It returns nothing for anonymous visitors.

#Parameters

Parameter Default Notes
identifier auth user's email Author identifier: user ID or email.
limit 20 Number of comments to return.
site / locale current site Restrict to one site. * includes all sites.
published_only true When false, users with view comments can also see unpublished comments. Everyone else still receives public comments only.

#Variables

The tag returns stored comment fields but not the current_user.* block. Use a surrounding auth: tag for information about the signed-in user.

#Protect author data

For public profiles, keep published_only="true" and render only the fields you need. Do not expose email addresses, comment_data, or custom metadata.

For moderation lookups, use GET /api/meerkat/authors/{identifier}/comments. It requires view comments.

Was this page helpful?