1

I'm building classifieds site with drupal and got stuck on one major issue: I have 1 taxonomy vocabulary with parents, children, grandchildren and great-grandchildren, and can't find a way to build browser which would not restrict user's choices.

Over few days I found many drupal users stuck in the same place waiting for hierarchical taxonomy filters in views. this simple hierarchical select almost solves it, however in views it does not show child nodes when parent term is selected.

So what are the ways to go around this issue in drupal? Anyone built a site with hierarchical taxonomy vocabularies?

2 Answers 2

2

This is unfortunately a big pain point with Drupal 7. On my site, I handled this with Views and Panels.

In my case, the hierarchies with places generated by the Location taxonomize module in the form of country / state / city or country / city.

To give you a rough idea of how I approached it: I overrode the taxonomy term path using Panels/Page Manager. I then added two variants in the following order:

  1. a variant containing a content pane that aggregates countries and shows only those countries with 1 or more entries
  2. a variant containing a content pane that takes a country as an argument/contextual filter and shows users having that taxonomy term as well as a list of states using the special Panels related terms (show children) block

Depending on the structure of your taxonomy and what you are trying to show, this can be an extremely complicated setup, but it is possible even without direct support from hierarchical select.

1

If you're using hierarchical select, make sure you set the 'save term lineage' setting.

That way, child nodes will be tagged with the parent and child taxonomy term(s) allowing them to show up in a filter on the parent term.

You might also be interested in faceted search and apachesolr

2
  • But hierarchical select isn't supported in views! Does faceted search in apachesolr has hierarchical filters, like the same hierarchical select?
    – stasko
    Jan 28, 2013 at 1:07
  • A taxonomy based hierarchical select widget saves it's data as terms for display in views. Use contextual depth filter to select child terms for inclusion in display. Jan 28, 2013 at 2:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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