4

I am working on a biology website that needs to make use of Drupal 7's Taxonomy system, for a biological taxonomy.

My goal is to allow users to tag all content with related species information, and provide the following functionality:

  1. Display all nodes that are associated with a child term of the specified taxonomy term (so if they access the "Birds" term, "sparrow" would be included)
  2. Include taxonomy terms in search
  3. Allow for species nicknames, (synonyms), abbreviations and variations in spelling or singular/plural usage

I have installed the Hierarchical Select module, but am not sure it is working correctly. Or, I am not using it correctly. When I insert new terms deep in the hierarchy, they sometimes end up at the top level. There have also been intermittent errors showing in a red box. I'll add that to this post if it shows again.

Example taxonomy

Animalia 
- Chordata
-- Aves
--- Passeriformes
---- Passeridae
----- Passer
------ Passer domesticus (primary species term)
------- Common sparrow   (synonym)
------- English sparrow  (synonym)
------- House sparrow    (synonym)
------- ENSP             (synonym/abbreviation)
------- House sparrows   (synonym/plural)

In the above example, I need users to see English Sparrow content when they view the Taxonomy page for Aves, as well as the Taxonomy page for "ENSP" if the node has been tagged with Passer domesticus or any of its child terms.

Ideally, a basic search for any of the child terms for Passer domesticus would also return a list of nodes tagged with any of the term's siblings.

I am open to configuring a View for this, if Search is not possible. All advice is appreciated.

Similar questions from others: http://drupal.org/node/1792256

How to have parent taxonomy terms include their children terms' nodes?

How to show the parent and child taxonomy term?

https://stackoverflow.com/questions/5910071/views-show-child-taxonomy-terms

1

1 Answer 1

-1

I would look into using Search API for this and build up facets using the Facets API.

Once you have Search API installed you need to create a search index, choose which fields to index and what facets to create.

With the search index in place you can from Views create a Search view that uses your index as base.

Place the facets where you want them and tell them to show up at your search views url.

There is a guide that explains how to setup Search API here. In the guide they use Apache Solr as backend for the search index. That is not necessary, you can use the database as backend but I recommend using Apache Solr as backend as I've stumbled on a few bugs in the database backend which work with Solr.

You would be able to do searches such as this:

enter image description here

Good luck

2
  • This answer mentions some modules but doesn't address hierarchy specifically. Feb 19, 2015 at 17:28
  • @DanielFeder Facets API provides facets for hierarchial taxonomy vocabularies. Feb 20, 2015 at 8:21

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.