For my shop, I need a taxonomy tree view with 2 levels, the number of items should be shown in brackets for every parent and child term. My problem: it works for the child terms, but not for their parents.
This should my view look like:
parent-term-1 (15)
- term-1.1 (7)
- term-1.2 (8)
parent-term-2 (15)
- term-2.1 (6)
- term-2.2 (9)
But it looks like this:
parent-term-1 (0)
- term-1.1 (7)
- term-1.2 (8)
parent-term-2 (0)
- term-2.1 (6)
- term-2.2 (9)
My view
Vocabulary Name = Category
Relationships
Taxonomy Term: Parent term (Identifier = Parent)
Taxonomy Term: Content with term (Identifier = node)
Use aggregation: Yes
Fields
Taxonomy Term: Term ID (Exclude from display)
(Parent) Taxonomy Term: Term ID (Exclude from display)
Taxonomy Term: Name
(node) COUNT (Content: Nid)
Filter criteria
Taxonomy vocabulary: Machine Name=(Category)
Format
Format: Tree (Main field: 1st Term ID, Parent Field: 2nd Term ID)
Field Settings: 3rd + 4th field inline
Any ideas?