3

I have taxonomy countries list with cities

Czech Republic
 - Prague
 - Brno
Germany
 - Berlin

Then I have content type position where I am using this taxonomy as select list. Now I need to create table with list of this content type.

Wanted result:

Country       || City
--------------||------
Germany       || Brno
Czech Republic|| Prague

I have created view for that, but I am not sure how to show parent of taxonomy term.

I have found that How to show the parent and child taxonomy term? but I do not see Taxonomy term: Term ID, Taxonomy term: Parent term at all

6

First you need to create a relationship "Taxonomy term on node" to your vocabulary and name the identifier as "term", then create another relationship "Taxonomy term: Parent term" using the previous identifier "term" as relationship and name the identifier as "parent". After that create a Contextual Filter "Taxonomy term: Parent term" using the identifier "term". Lastly add a field "Taxonomy term: Name" and use the relationship "parent".

Let me know if need anything else.

  • Thank you! That was exactly what I needed. I have one additional question. Is it possible to access user only child terms from taxonomy in content? To allow only to select city, not country. – Dawe Sep 14 '15 at 18:43
  • Hi @Dawe I would recommend you to accept the answer(+1) if that worked for you, as it will be helpful for others as well to pick up an already accepted answer. Also post one question at a time, in case you have unrelated queries, post them as separate question. As far as your question is concerned for term access tsa module(drupal.org/project/tsa) should do the job for you. – arpitr Sep 14 '15 at 19:06
  • 1
    Thank you arpitr. Unfortunately I am not able to add +1 to answer, because of small reputation – Dawe Sep 14 '15 at 19:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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