0

I have a taxonomy term with hierarchy (two levels, mother and children). When I set a relationship and say "Require relationship", all items dissapear which do not fit the relationship (Content having this taxonomy). But the content is associated to a child of the parent taxonomy, so in some sense, it would have to show the parent term of the taxonomy. Example: I have Taxonomy: Fiction, with children: Sci-Fi, Terror, Romantic.

I associate a content (book) with Sci-Fi. I would like that in the listing, there would appear Fiction and Sci-Fi and not only Sci-Fi. Assigning the book to both Fiction (parent term) and Sci-Fi does not seem the best option and it is not elegant.

Note: there is a suggested solution, but I think that proposal does not fit my case, because I don't want the parent taxonomy to be repeated for each book. In fact, I print a listing of taxonomies, Fiction, then the children (Sci-Fi, Terror, etc.), and in each, the products (books). I don't want the word "Fiction" to be repeated over and over.

  • Maybe you are looking for this drupal.stackexchange.com/a/50930/35467 – Sujith Nara Sep 14 '15 at 11:01
  • Exactly! thanks a lot!! Somehow I had missed that. I have duplicated content, but one with parent relationship and the other fields with children, and works perfectly. – Cesar Sep 14 '15 at 11:19
  • 1
    Well. Not exactly. Finally I have found that the content duplicates, so I am going back to my method, which is to assign parent and child terms to the node and then make some slight hook alter to display the results. I consider it still pending of resolution, maybe it is not possible for a single query, as I would like the parent taxonomy and then all the children, with no repetitions, and with this approach that is simply not possible. – Cesar Sep 14 '15 at 14:20