What is Taxonomy?

In Drupal, Taxonomy is the name for the practice of classifying or categorising content. You can associate taxonomy terms with specific content, which is useful for organising and displaying it based on its classification. 

Terms and vocabularies are the key concepts in Drupal taxonomy:

  • A taxonomy vocabulary is a set of taxonomy terms. A standard example could be a set of categories for a website’s News section.
  • A taxonomy term is an individual item as part of a vocabulary. For example, “Media release”, “Ministerial Announcement”, “Departmental Announcement”. 

Based on structure, a vocabulary can be:

  • flat (a set of terms)
  • hierarchical, or nested (a set of terms that further expand into child terms, which would represent subcategories)

Multiple terms can be added to content to assist with categorisation. 

Adding taxonomy terms to content is also known as "tagging". However, in Drupal, Tags is also an out of the box vocabulary available to be configured with terms.
 


Common vocabularies

Available vocabularies can be viewed from the Structure > Taxonomy menu. In Rapid Start, there are a number of vocabularies that are available out of the box. The most commonly used vocabularies include:

  1. Category - this vocabulary is most notably used when using the Video Gallery component, allowing editors to tag videos with terms from this vocabulary to be used as filters and/or defining collections of videos to display.
  2. Media Directory - the vocabulary used to create a folder structure in the Media Library. More information about the Media Directory is available here.
  3. Publication Type - this vocabulary is the primary method of categorising Publications. More information about creating Publications is available here.
  4. Tags - this vocabulary is the primary method of categorising content across your website. Terms under the Tags taxonomy can be added to all content types (also known as page templates).
  5. Themes - this taxonomy is the default filter on Views in Drupal, including in Search Results, News and Stories and Case Studies.
In Drupal, Views are dynamic templates which display collections of content based on pre-configured filters. Views often have a search and filters available for users to further refine the content to suit their needs.
Adding new vocabularies

Adding new vocabularies requires administrative rights as new vocabularies also need to be linked to content types (also known as page templates) to allow editors to use them. As such, editors will need to request new vocabularies from the DE&S team via CS Connect. 


Adding terms to vocabularies

Terms can be added to existing vocabularies from the Structure > Taxonomy menu. Editors can either click the 'List terms' button in the Operations column or select the down arrow next to it and clicking 'Add terms' if you are sure the term doesn't already exist.

When adding a new link, editors will need to define:

  1. Name - the name of the taxonomy term.
  2. Description - an optional field allowing editors to add a note of the intended use of the term.
  3. Relations
    1. Parent terms - a list allowing editors to nest the new term under an existing term to create a parent-child relationship. This may be desirable if a large number of terms are being added to make it simpler for editors to manage.
    2. Weight - an optional field which will impact the order of the term in the vocabulary or parent term. You can also adjust the order of terms using drag-and-drop functionality as described below.
  4. URL alias - it is not recommended to create an alias for a term.
  5. Published - a checkbox field determining whether the vocabulary item is published. Regardless of the setting of this field, this term will not be visible until it is added to a component which decides terms on the front end.

If you wish to create a subsequent term, click 'Save' which will create the term and reload the Add Term form, otherwise, click 'Save and go to list' to create the term and return to the vocabulary list.
 

In Drupal, Views are dynamic templates which display collections of content based on pre-configured filters. Views often have a search and filters available for users to further refine the content to suit their needs.

Editing terms

Once a term has been created, it can be updated via the Structure > Taxonomy menu. Click 'List terms' for the vocabulary you wish to update, then click 'Edit' from the Operations column for the term you wish to update. Once you've made the required updates, click the Save button to finalise your changes.
 


Reordering terms

Reordering terms in a vocabulary list, like any structured entity in Drupal, can be done using drag-and-drop functionality.

Screenshot of links in the main navigation with the crossbar handle highlighted.

Click and drag the crossbar handles to move terms up or down to reorder. Dragging items sideways will indent and outdent, creating a nested or hierarchal parent-child relationship between terms as demonstrated above. 
 


Deleting terms

Terms can be deleted via the Structure > Taxonomy menu. Click 'List terms' for the vocabulary you wish to update, then click the down arrow next to 'Edit' from the Operations column for the term you wish to remove and click Delete.  You will be asked to confirm the deletion as this action is permanent.