<$mt:EntryCommentCount$>
Outputs the number of published comments for the current entry in context.
Attributes ¶
All <mt:EntryCommentCount> attributes are optional. The most common attributes are:
singular ¶
Allows special formatting for when the number of published comments for the entry is equal to 1.
<$mt:EntryCommentCount singular="1 comment">
plural ¶
Allows special formatting for when the number of published comments for the entry is greater than 1.
<$mt:EntryCommentCount plural="# comments">
none ¶
Allows special formatting for when the number of published comments for the entry is 0 (zero).
<$mt:EntryCommentCount none="No comments">
or
<$mt:EntryCommentCount none="None">
Example ¶
<$mt:EntryCommentCount singular="1 comment" plural="# comments" none="no comments"$>
Gautam Patel
September 13, 2009 5:19 AM | Reply
From one of the default templates, I picked up this nugget:
I guess this means that this tag takes additional attributes:
to be used thus
The tag then evaluates the number and if it is 0, uses the none attribute; if 1, then the singular attribute, and if more than 1, the plural attribute.
Gautam Patel
September 17, 2009 4:51 AM | Reply
correction:
it's this:
And it works on all count tags.
cks
January 13, 2010 1:18 PM | Reply
Awesome. Thanks, Gautam Patel.
Dave Aiello
replied to comment from Gautam Patel
June 18, 2010 1:16 PM | Reply
We're recognizing Gautam's observation by adding it to the documentation. Thanks.