Categories:
About It:
Rate it:
Flag it:
Comments Count
To display the number of comments for an article (for use in an aritcle form), use the following tag: <txp:comments_count />.
This tag will display a number if there is at least one comment to the article. If you would like the number ‘0’ to display when there are zero comments, find /textpattern/publish/taghandlers.php
and replace (approximately line 712):
return ($thisarticle[‘comments_count’] > 0) ? $thisarticle[‘comments_count’] : ‘’;
with
return $thisarticle[‘comments_count’];
Initially released:
2004-12-03Posted here:
03 Dec 2004Article modified:
03 Dec 2004









You may want to leave your comments/questions at the Forum thread for quicker feedback. Otherwise, comment away:
Commented (2)
This isn’t necessary anymore, this tag (comments_count) will return zero if there are no comments.
door.txt;5
Subscribe to this article's comments RSS feed. [ ? ] View Recent Comments across the site.