Drupal Views Taxonomy Parent Term and Child Term
I wanted to display a block using views where the taxonomy parent and child needed to displayed in separate fields.
Eg Books Parent term: Adult and Child Term: Fiction
So block view should be such that
Book Title – Parent Term – Child Term ie Eclipse – Adult – Fiction
To achieve this Go to Views
- Add “Relationships”
- Select “Taxonomy: Parent Term” (use the default settings)
- Add Fields
- Select “Taxonomy: Term”
- Relationship: Parent
- Add Fields
- Again Select “Taxonomy Terms”
- Relationship: Do not use a relationship
Now we have reached our goal … simple but takes some digging …
Thank you for simple article about relationship in views! Very clear and useful!
Respect!
Thanks … it means a lot!
Thank you I think this post should be at firt place in google
The appreciation I receive from you all means more then that to me .. thanks!!
hai. it is not working. it is displaying the parent terms for two times
[...] Reference: Drupal Views Taxonomy Parent Term and Child Term [...]
Sure, it seems so obvious, and yet, it took me forever to hit this page and really find out. On the way I learnt a lot of pre-processing and stuff, you know what I mean…
Thank you so much.
Just what I was looking for.
Thanks!
I got this working with 3 layers. So the 3rd would be a child of a child. The only problem is that childs, which do not have sub-childs do not show up. I tried combining 2 arguments to allow either 2 layers of the 3 to be substituted into the url, but i could not figure it out. please help
Wow. I’ve been doing views for years and never stumbled into the Relationships part of term views — thank you!
What if you have to parent terms, such as country and state for a city?
Great!!!
Short but direct to heart!!
Thanks
how to add content to taxonomy child and parent in drupal 7?
i found anythings
This post solved something very fundamental which is extremely difficult to find out how to do!
Dear god i have spent days trying to get this sort of thing working..
Thank you so much. the nightmare is finally over.
it is possible to display just 2 levels in the tree?
Hi,
Parent taxonomy displaying two time,
Can anybody help me
Thanks