Search
Meerkat

Meerkat

The "thread" Filters

The thread filters allow you to filter comments based on whether or not the thread they are attached to exists in a list of provided identifiers. Thread identifiers are the ids of your Statamic pages, collection entries, etc.

The thread filters are not universally supported by all Antlers tags. For example, the {{ meerkat:responses }} tag always operates on the current page context.

#The thread:in Filter

The thread:in filter allows you to filter comments to only those comments that belong to the provide list of thread identifiers. The following example would return only those comments attached to an entry with the id of 8aa68f00-abfd-4606-9722-0e0b194fe257:

1{{ meerkat:responses filter="thread:in(8aa68f00-abfd-4606-9722-0e0b194fe257)" }}
2 
3 {{ comments }}
4 <!-- Render your comment thread here. -->
5 {{ /comments }}
6 
7{{ /meerkat:responses }}

You may also supply the magic value *current* to have Meerkat automatically add the current page or entry's id to the list:

1{{ meerkat:responses filter="thread:in(*current*, 8aa68f00-abfd-4606-9722-0e0b194fe257)" }}
2 
3 {{ comments }}
4 <!-- Render your comment thread here. -->
5 {{ /comments }}
6 
7{{ /meerkat:responses }}

The thread:in filter accepts multiple thread identifiers as input.

If you need a generalized version of the thread:in filter, consider checking out the documentation for the where:in filter.

#The not:thread:in Filter

The not:thread:in is the logical opposite of the thread:in filter, and allows you to filter comments to only those comments that are not found in the provided list of thread identifiers. The following example would return only those comments not attached to an entry with the id of 8aa68f00-abfd-4606-9722-0e0b194fe257:

1{{ meerkat:responses filter="not:thread:in(8aa68f00-abfd-4606-9722-0e0b194fe257)" }}
2 
3 {{ comments }}
4 <!-- Render your comment thread here. -->
5 {{ /comments }}
6 
7{{ /meerkat:responses }}

You may also supply the magic value *current* to have Meerkat automatically add the current page or entry's id to the list:

1{{ meerkat:responses filter="not:thread:in(*current*, 8aa68f00-abfd-4606-9722-0e0b194fe257)" }}
2 
3 {{ comments }}
4 <!-- Render your comment thread here. -->
5 {{ /comments }}
6 
7{{ /meerkat:responses }}

The not:thread:in filter accepts multiple thread identifiers as input.

If you need a generalized version of the not:thread:in filter, consider checking out the documentation for the not:where:in filter.

Some absolutely amazing
people

The following amazing people help support this site and my open source projects ♥️
If you're interesting in supporting my work and want to show up on this list, check out my GitHub Sponsors Profile.