num_comments
Previous  Top  Next

An integer variable containing the number of comments posted in response to the article.

It can also be used as a boolean variable; it is true if it is nonzero.



Example
In the example below, if at least one person has commented, the phrase "n people have commented so far." (where n is the number of comments) is displayed. If no comments have yet been made, the phrase "Nobody's commented yet." is displayed.

{{if num_comments}}  
{{num_comments}} people have commented so far.  
{{else}}  
Nobody's commented yet.  
{{/if}}