{slice_comments:slice_id}

Description

Returns the total number of discussion comments posted across all items in one slice. It sums the disc_count column of every item in the slice. disc_count is the per-item comment total kept by the discussion module - it counts every comment, including hidden or unapproved ones, not only the visible ones. The single argument is the 32-character slice id. A slice with no comments, an empty slice id, or an unknown slice id all return 0. This is a live, mutable count: it changes whenever a comment is added, removed, hidden, or approved, so it is not a fixed value. It is a specialized, rarely used command (the source marks it as not yet in regular use).

Parameters

slice_id required default (none)

The 32-character id of the slice whose comments are counted. The command sums disc_count over every item in this slice. An empty, malformed, or unknown id yields 0 (no rows to sum).

Examples

test{slice_comments:9e1d2b9f88e3d6c3bf0eb967378610d6}
Expected0
Actual0
Total discussion comments in one slice. The Stable test slice has no comments, so the count is 0. Pass the 32-character slice id as the only argument.
test[{slice_comments:}]
Expected[0]
Actual[0]
An empty slice id sums no rows and returns 0. The brackets are only here so the empty-output case is still asserted as a test.
test[{slice_comments:00000000000000000000000000000000}]
Expected[0]
Actual[0]
An unknown or malformed slice id also returns 0 - there are no matching items to sum.
virtual{slice_comments:d909f5c3761b92c755a8a7bac4501e93}
Expected(5 on this install; a live, mutable count)
Actual5
A slice that has discussion comments returns their total. This is a live count - it changes as comments are added, removed, hidden, or approved - so it is illustrative, not a fixed test value. The number includes hidden and unapproved comments, not only the visible ones.
virtualComments in this section: {slice_comments:d909f5c3761b92c755a8a7bac4501e93}
Expected(Comments in this section: 5)
ActualComments in this section: 5
The usual real-world use: drop the count into a heading or summary line. Replace the id with your own slice id.