5

This question already has an answer here:

Ok, so I've been ripping my hair off for the past 2 days now. I'm developing a web-site with a car catalog which contains the following hierarchy (taxonomy hierarchy):

-brand1
--model1
--model2
--model3
-brand2
--model1
--model2
--model3

...and so on.

What I'm trying to achieve is when a user selects a parent term (brand), they'll see all the nodes from all the children terms. Currently a parent term doesn't display anything.

I already Googled my problem but none of the solutions seem to work for me (or it's possible I'm doing something wrong).

My configuration is as follows: Drupal 7.2x Views 3.7 Taxonomy Menu 1.4 module - used for generating menu trees from vocabularies. Pathauto 1.2

I use views to display the whole vocabulary - and it works as intended.

Can some one please give me a step-by-step guide on how to achieve this? Especially if it involves Views, as I'm still a noob with Views.

Is it possible the Taxonomy Menu module is causing trouble?

marked as duplicate by mpdonadio May 29 '14 at 15:08

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • drupal.org/project/term_reference_tree try this module - This module is also perfectly good for flat lists, particularly if you want to filter them by a view, but it have limitation it only show all the item in single page. – Bala Apr 23 '13 at 5:38
13

Actually there's a very easy (built-in) method...

  1. Go to admin/structure/views, find the view named Taxonomy term, and enable it
  2. Go to admin/structure/views/view/taxonomy_term/edit
  3. Click Advanced (on the right)
  4. Click Content: Has taxonomy term ID (with depth)
  5. Select a Depth of 1 or more
  6. Save all your changes

Now, assuming the term id of Brand 1 is 1, when you visit www.yoursite.com/taxonomy/term/1, you should see all the child nodes listed. You can also create path aliases to make paths like taxonomy/term/1 more "pretty".

Hope that helps...

:)

  • YES! IT WORKS!!! Thank you so much, you're a life saver! =) – zombar Apr 23 '13 at 6:32
0
  1. taxonomy/term/x -- where x is the term id to show, a number.

  2. to show children nodes you need to add a depth variable. The syntax is: taxonomy/term/x/y -- where x is the term id to show, and y is the depth to go below x.

  3. to show all children nodes. The syntax is: taxonomy/term/x/all -- where x is the term id to show.

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