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.
Example tasks
- Set up a taxonomy to categorize your site’s content
- Access taxonomy entity data in a module
Confidence
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’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.
Drupalize.Me resources
For developers
Taxonomy uses Drupal’s Entity API.
Drupal 7
External resources
-
Organizing content with taxonomies (Drupal.org)
- Some questions to help you determine how you may want to use taxonomy.