1

In a View based on a Taxonomy Term, is there a field which shows a count of how many relationships that tag has?

I'm pulling a list of Academic Years in this situation. If there is no Nodes tagged with these years, I'd like to omit them from the list.

enter image description here enter image description here

1 Answer 1

3

You can solve this two ways:

  1. You can create a view of nodes, create a relationship to their taxonomy term, and display the terms. This will only display terms that can be pulled up through a node by views.

  2. You can keep your taxonomy display and add a relationship. Add "Taxonomy: content with term" and the check the box labeled "Require this relationship". This will give you duplicates so you also need to go down to "Query Settings" and check the box for "Distinct".

2
  • 1
    I forgot to mention that if you want to display a count of nodes under each taxonomy term, option one will do that. Option two won't, by default. Commented Nov 20, 2012 at 22:06
  • Good to know, but I just needed to not show taxo terms without associated content. This was great. Commented Nov 20, 2012 at 22:08

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.