0

I use vocabulary with following term structure (more/deeper structure in real):

Fruits
-apples
--red apples
--green apples
-bananas

I want to create:

  1. List of all nodes belonging to Fruits term (excluding green apples for some reason)
  2. List of all nodes belonging to Apples (having both red and green apples)

I need to display all nodes related to term Fruits (as well as all nodes related to all children terms of term "fruits" AND exclude term "green apples"). Is it possible to dynamically exclude certain terms when creating such lists? I could not find any way to do it using views. Probably some coding is necessary?

Thank you

  • if you are using "Simple hierarchical select Module" drupal.org/project/shs you can easily do this by selecting the depth. you did not mention what module you used for hierarchy – Said Yousafzai May 31 '15 at 11:49
  • @SaidYousafzai shs module seems to be just for connecting terms to nodes. For that I use built in taxonomy field on node edit form. What I need is to dynamically remove certain child terms when displaying nodes related to terms and all their children. – loparr May 31 '15 at 12:27

Your Answer

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

Browse other questions tagged or ask your own question.