Thread Sharing

Multiple entries can share one comment thread through an entry field.

#Setup

Add an entries field with handle meerkat_share_comments to your entry blueprint, configured to allow a single selection:

1-
2 handle: meerkat_share_comments
3 field:
4 type: entries
5 max_items: 1
6 display: Share Comments From
7 instructions: |
8 When set, this entry borrows the selected entry's comment thread;
9 both the listing and the submission form use it.

Comment listings and forms use the selected entry's thread.

To use a different field handle, configure config('meerkat.publishing.share_field'). Set it to null to disable the function.

#Which setting wins

When more than one thread source is available, the tag uses the first match:

  1. Explicit thread="..." or from_thread="..." parameter
  2. The meerkat_share_comments field on the current entry.
  3. The current page ID

#Accepted values

Either of these works:

1meerkat_share_comments:
2 - the-target-entry-id
3
4meerkat_share_comments: the-target-entry-id

The field also accepts a thread ID. If a value matches both an entry and a thread, the entry wins.

#Where shared comments are stored

Comments belong to the selected entry's thread, collection, and site. Moderators see them under that thread.

#Closing a shared thread

{{ meerkat:comments_enabled }} uses the selected entry's manual and automatic closure settings. Closing the shared thread closes comments on every entry that uses it.

#Debug helper

Use {{ meerkat:debug }} to see which thread Meerkat uses:

1{{ meerkat:debug }}
2 <ul>
3 {{ rows }}
4 <li><strong>{{ label }}:</strong> {{ value }}</li>
5 {{ /rows }}
6 </ul>
7{{ /meerkat:debug }}
1<s-meerkat:debug>
2 <ul>
3 @foreach ($rows as $row)
4 <li><strong>{{ $row['label'] }}:</strong> {{ $row['value'] }}</li>
5 @endforeach
6 </ul>
7</s-meerkat:debug>

Output includes:

  • Is sharing context: yes/no
  • Share field: the active field handle (or (disabled))
  • Share field value: the raw value on the current entry
  • Logical context (page id): the current entry's id
  • Effective thread id: the thread ID that the comments tag queries
  • Max reply depth: the configured nesting cap, or unlimited

Render the debug tag only in local development.

Was this page helpful?