2

I want to use the Views module to obtain the number of comments associated to a node, and show it as "1 comment," "5 comments."
How do I do this?

2

Checkout the Views Group By module, this will do it. Here is a quote about it (from the module's project page):

... enriches Views2 functionality with SQL Grouping and Aggregation capabilities.

A new field group: SQL Aggregation is added, in Views, once you install the module. The field group has one available field: SQL Aggregation: Group By Fields. The field allows to configure many aspects of "group by" SQL clause and "count()" fields.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.