Tell me more ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

I want to create a list of users registered in the website using Views and, beside the names, I want to show the corresponding number of nodes they created. I know there are some contributed modules that consolidate and do some sum (never used them, though), but as I was doing some research, it seems these modules are targeted for Drupal 6. Is there a solution for Drupal 7?

Example of the expected output:

Carl (27)
John (18)
Susan (16)
Lorren (13)
Jane (5)
Norman (4)
... 
share|improve this question
Users is not listed in Show: what should i download? Thanks – Samer Hijazi Apr 16 '12 at 13:42

migrated from superuser.com Apr 1 '11 at 4:10

3 Answers

up vote 9 down vote accepted

You just need Views 3. No additional modules.
1. Make sure you have the latest views 7.x-3.x-dev version installed. In general, it has the least number of bugs (at least until beta4 arrives)
2. Create a new users view (add new view, show: "Users")
3. Add a relationship: "User: Content authored"
4. In the last fieldset on the right ("Other"), select Use grouping: "Yes"
5. Add a Content: nid field, and when asked for the grouping function ("Group type"), select "Count". Uncheck the "create a label" checkbox in the configure field screen, so that it only shows the number.

And you're done.

share|improve this answer
Great! It works. Thank you so much! – Marcos Buarque Apr 3 '11 at 3:25
And a +1 from me. But, could you be more explicit about how to add a relationship? I don't see that option when creating the view ... – Mawg Nov 7 '11 at 2:45
You have to wait until the view is created, then look under Advanced on the right side of the view edit screen. – Ryan Price Jun 7 '12 at 18:07

Have you tried Views Calc? It has a count function that can be used to produce automated sums

Also there is a Drupal 7 --dev branch that can be downloaded

share|improve this answer

The problem with this is that the list only appears for me when I'm logged with the superadmin account, seems like there is a problem with permissions so I solved it using http://drupal.org/project/views_field_view to create a view (the one that displays the authored content count with a contextual filter with the uid) inside of view (the one that displays the list of the authors)!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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