Vine Type Content Management with Standards in Mind

30 Nov 2005

$_formatted_comment_count

variable
  • $_formatted_comment_count
applicable sections
  • article
associated vinetype.config variables
description

Place this variable at the location in the article element where you want the count of comments displayed.

notes

This value will output the text associated with one of three vinetype.config entries depending on the number of comments currently associated with the article.

That is, when there are no comments associated with the article, Vine Type will display the value associated with the $formatted_comment_count0 entry.

Similarly, Vine Type will display the value associated with the $formatted_comment_count1 and $formatted_comment_count2 entries when the number of comments is one and more than one, respectively.

This variable, in conjunction with the count0, 1, and 2 vinetype.config entries allows for proper subject/verb agreement rather than generating generic "0 comment(s)" "1 comment(s)" "2 comment(s)" output.

It also allows for creativity: when there are no comments, you can specify text such as "Be the first to comment" instead of "0 comments".

Note that the actual ordinal number is generated through a different read-only variable: $_article_comment_count.

download

Visit the Download Area to test drive the standard in standards compliance.

upgrade

Add professional features to your Vine Type site by purchasing a Vine Type Pro license.

feedback

Discuss Vine Type or pose questions at the official Vine Type Forum hosted by ASP Advice.

about us

Learn more about this site and the features it is demonstrating.

© 2001-2017 vine branches — website powered by vine type