1

I am following drupal documentation. In chapter 6.5, they explain how taxonomy is different from vocabulary. In this page it is suggested that on a website, which list farmers and recipes list by them, we should have a taxonomy for the ingredients of recipes:

the farmers market website could use an ingredients taxonomy to classify recipes.

So lets say I have a taxonomy ingredients with its terms as red tomato, green tomato, small tomato, cumin, carrot, eggplant, salt, pepper. Also the documentation mentions:

...a set of terms is known as a vocabulary ...

So in my case red tomato, green tomato and small tomato represent one vocabulary.

In the next documentation page chapter 6.6, it says:

Create an Ingredients vocabulary

No no no, so my question is how do I create an Ingredients taxonomy; not an Ingredients vocabulary? Even in drupal admin panel I see only the option to create vocabulary under structure>taxonomy.

user31782
  • 7,087
  • 14
  • 68
  • 143

2 Answers2

2

the farmers market website could use an ingredients taxonomy to classify recipes.

Create an Ingredients vocabulary

Maybe it was a wording error in the Drupal documentation. Actually taxonomy is an entity type, which is already built by Drupal core. So you'll never have to create it. What you need to do is create a vocabulary which is a set of taxonomy terms of the same type used to classify something.

Specifically, in your case, ingredients is a vocabulary, and red tomato, green tomato, small tomato,... are taxonomy terms

Kien Nguyen
  • 2,616
  • 2
  • 7
  • 24
  • Where can I find the definition of _taxonomy_? In my opinion _ingredients_ is a texonomy with two vocabularies _tomato: red tomato, green tomato, small tomato_ and _others: cumin, carrot, eggplant, salt, pepper_ – user31782 Jun 17 '22 at 00:02
  • 1
    @user31782 A taxonomy is a classification of terms and we classify terms according to a _vocabulary_ (or lexical field). What is confusing you is the (possible) vocabulary's hierarchy. All ingredients of any recipe can be classified under a single vocabulary that you might preferably want to call _ingredients_ : ie. to list the ingredients of a given recipe, you will refer to this vocabulary, not _tomato_ nor _others_. But nothing prevents having a hierarchical structure where you have the vocabularies _tomato_ and _others_ under _ingredients_, each with their respective subset of ingredients. – EricLavault Jul 03 '22 at 13:22
  • @EricLavault Does `taxonomy - vocabulary` follow the `class - object` analogy? Sounds like `ingredient` is a class and the _terms_ are the objects of that class and then collection of terms(objects) is vocabulary. – user31782 Jul 05 '22 at 12:49
0

In English, a term can have different meaning based on perspective, with that said, the Drupal meaning of taxonomy is as follow.

Taxonomy = vocabularies containing terms.

Ingredients taxonomy = Ingredients Vocabulary (containing) -> Red Tomato, Cumin......

Mostly the way you classify your information.

Please refer to this https://drupalize.me/topic/taxonomy a reupdated source for Drupal topics.

amjad1233
  • 21
  • 7