<$mt:EntryCommentCount$>

Outputs the number of published comments for the current entry in context.

This page was last updated on 1969-12-31, 16:00. [Edit]

2 Notes

From one of the default templates, I picked up this nugget:

      <$mt:EntryCommentCount singular="<__trans phrase="1 Comment">" plural="<__trans phrase="# Comments">" none="<__trans phrase="No Comments">"$>

I guess this means that this tag takes additional attributes:

  • singular
  • plural
  • none

to be used thus

              singular="Comment" plural="Comments" none="No Comments"

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.

correction:

it's this:

           singular="1 comment" plural="# comments" none="No comments"

And it works on all count tags.

Leave a note

Have a question? Please use the MT Forums. Notes submitted on documentation should pertain to tips & hints regarding documentation. Your note may be removed once its contents have been integrated into the body of the page.