Taxonomy provide a way to classify your site's content. Taxonomy vocabularies are created with terms within those vocabularies. Then reference fields can be added to content types or other entity bundles so that content can be individually categorized.
For example, on the Drupalize.Me website, we have a vocabulary called Categories with terms for each category of content we have, i.e., Site Building, Theming, Module Development, Site Administration, and Backend and Infrastructure. We then add a reference field on each content type, like blog and tutorials. This enables us to "tag" each blog post or tutorial with the appropriate category.
- Set up a taxonomy to categorize your site's content
- Access taxonomy entity data in a module
The process of using Drupal's administrative UI to create vocabularies, terms, adding taxonomy fields, and tagging content with taxonomy terms is essentially the same process in Drupal 7 as in Drupal 8. However, the developer experience of accessing taxonomy-related data in a module has changed due to Drupal 8's object-oriented architecture and also its emphasis on practically everything being an "entity." Thus, instead of taxonomy-specific functions, taxonomy data is accessed programmatically via the Entity API. See the Entity topic for more information.
We are still filling out our Drupal 8 library and this page will be updated with new tutorials as they are created.
- Using Taxonomy
- This video gives an overview of the main terminology and concepts of taxonomy, and then walks through creating a new vocabulary and terms in Drupal 7.
- Drupal 8 Entity API
- In this series of tutorials, learn about Drupal's Entity API and how to work with data from entities in a module. Taxonomy falls within the Entity System.