For the most part the Views module is excellent and meets just about all of my needs for customizing the layout of my information. However, there is one feature that I would love to be able to have available, and that is a Field that displays the number of children nodes for terms.

Take for example a vocabulary called "Food" with terms "Fruit" and "Meat." Each term then has multiple content associated with them. What I'm wanting is to have a view that lists the content count for the terms. So, for a list view with a node title field and this new "content count" field (along with node published filter) it might look something like this:

* Fruit (15)
* Meat (7)

Also, if it could have a label field like some of the other Fields, that would be great as well.

Comments

merlinofchaos’s picture

What you want is a summary view.

Add the term: tid argument to a view. Set the 'default' to summary, sorted ascending.

Perhaps filter it to a specific vocabulary, if you like.

Enjoy the result.

mscdex’s picture

At first I could not figure out why the view was not working. You can't specify a URL that contains an alias, it has to be the original path to the node. However, when I do that, then my links generated by the view do not contain aliases (I use pathauto if that can help alleviate this issue). Is there a way around this?

thomasmurphy’s picture

Thanks, merlinofchaos, this was super useful

sun’s picture

Status: Active » Fixed

Use a summary view. For views supporting arguments, you need the optional custom_url_rewrite() implementation that allows you to use partial URL aliases.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.