I'm looking to create website that has a functional scientific taxonomy tree. There will be about 2000 species that span hundreds of genus and many families, classes, orders, subphylum and phylum. Luckily they are all in the same kingdom.

I have an instance of Drupal 9 and started to fill out the vocabulary names and terms.

Is this the best way (for development and maintainability)?

So far I've created a separate vocabulary name for each taxonomy level (phylum, subphylum, class, order, family, genus), excluding the species level. Inside each vocabulary, there will be the terms, the scientific taxonomy names.

Let’s take the Common Box Turtle as example.

  • Phylum: Chordata
  • Subphylum: Vertebrata
  • Class: Reptilia
  • Order: Testudines
  • Family: Emydidae
  • Genus: Terrapene
  • Species: Terrapene carolina (Common Box Turtle)

I went into each vocabulary and created the matching terms. In Manage fields, I added the taxonomy levels. This is were I'm running into my first issue. I'm entering duplicate data and if a genus gets moved to another family, there will be multiple places that will need to be updated, because nothing is directly tying this tree together.

I then created a new content type (Species). I added the fields for each taxonomy level. Then, I created a new Species node, whose title is Terrapene carolina (Common Box Turtle) and filled out the taxonomy fields.

This brings me back to the question: How do I join terms of another vocabulary together?

That way as I fill out the taxonomy fields the options of the next field are filtered.

And lastly, if I click on any of the taxonomy nodes on the box turtle's page (for example, Testudines) I'm taken to the Order taxonomy level. There what I would like to see is the Families in that order, instead of all the species in that order.

Poking around I see some modules that extend the taxonomy features, but nothing that I could directly implement for my purposes.

  • 2
    Why would you need to update data in multiple places? I imagine the Order vocab has "Testudines" term with a reference to the "Reptilia" term in the Class vocab. If anyone ever decided "Testudines" were "Mammalia," you'd only need to change that reference.
    – beltouche
    Aug 9 at 2:22
  • Drupal taxonomy has tree structure by its own, I mean you only need one vocabulary and each term can have its own parents, so when defining term Vertebrata you can set its parent to be Chordata or you can then add a term called Reptilia and set its parent to be Vertebrata as well, so then when you add a species you can set its taxonomy to be Terrapene and the rest hierarchical will come along Aug 24 at 7:00

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.