0

I am in the process of creating a View for my Drupal site and I am attempting to add a contextual filter by Taxonomy so I've added the Content: Has Taxonomy term ID (with depth) filter and selected the Specify validation criteria option and selected the Taxonomy that I wanted to work with. I also used the filter value type of Term name converted to term ID yet when I attempt to preview the filtered elements, I get the no results behavior. What should I be typing to call the filtered elements correctly?

Atm, to provide a concrete example, I have tried my_view/mississippi-river to call all nodes tagged with the Mississippi River taxonomy term via hierarchical select. Again, this leads me to the no results behavior. Additionally, how would I call a child of the Mississippi River Taxonomy term? Any ideas?

0

Contextual filters are just the term. So in the contextual filter input box for the Views Admin you would put mississippi-river as an example. In addition to Term name converted to Term ID you want to be sure you check the box for convert spaces to dashes further down in the specify validation criteria or else "mississippi-river" will not be found because it's expecting a space and you're providing a dash.

For the parent/child filters you're trying to achieve look at Taxonomy Edge. The -dev release contains some contextual filters for "parents" and "children" of stuff.

  • also make sure that you have selected Save term lineage – wolverine Jun 30 '14 at 19:47
  • Thank you for your feedback. I have double-checked everything yet I am still unable to get the desired result. Could it be due to the fact that I'm using the Hierarchical select module as a content-type? "also make sure that you have selected Save term lineage" -- where is this interface where I can select Save term lineage? – user32172 Jun 30 '14 at 20:16
  • @user32172 Edit the field, go to Widget Type tab, there you will see it under Hierarchical Select configuration – wolverine Jul 1 '14 at 8: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.