Drupal taxonomy help
Background
Dazu und auf deutsch nachzulesen im drupalcenter.
Taxonomy is the study of classification. Drupal's taxonomy module allows you to define vocabularies which are used to classify content. The module supports hierarchical classification and association between terms, allowing for truly flexible information retrieval and classification. For more details about classification types and insight into the development of the taxonomy module, see this drupal.org discussion.
An example taxonomy: food
- Dairy
- Milk
- Drink
- Alcohol
- Beer
- Wine
- Pop
- Milk
- Alcohol
- Meat
- Beef
- Chicken
- Lamb
- Spices
- Sugar
Notes
- The term Milk appears within both Dairy and Drink. This is an example of multiple parents for a term.
- In Drupal the order of siblings (e.g. Beef, Chicken, Lamb) in a vocabulary may be controlled with the weight parameter.
Vocabularies
When you create a controlled vocabulary you are creating a set of terms to use for describing content (known as descriptors in indexing lingo). Drupal allows you to describe each piece of content (blog, story, etc.) using one or many of these terms. For simple implementations, you might create a set of categories without subcategories, similar to Slashdot's sections. For more complex implementations, you might create a hierarchical list of categories such as Food taxonomy shown above.
Setting up a vocabulary
When setting up a controlled vocabulary, if you select the hierarchy option, you will be defining a tree structure of terms, as in a thesaurus. If you select the related terms option, you are allowing the definition of related terms (think see also), as in a thesaurus. Selecting multiple select will allow you to describe a piece of content using more than one term. That content will then appear on each term's page, increasing the chance that a user will find it.
When setting up a controlled vocabulary you are asked for:
- Vocabulary name: The name for this vocabulary. Example: Dairy.
- Description: Description of the vocabulary. This can be used by modules and feeds.
- Types: The list of content types you want to associate this vocabulary with. Some available types are blog, book, forum, page, and story.
- Related terms: Allows relationships between terms within this vocabulary. Think of these as see also references.
- Hierarchy: Allows a tree-like vocabulary, as in our Foods example above.
- Multiple select: Allows pieces of content to be described using more than one term. Content may then appear on multiple taxonomy pages.
- Required: If selected, each piece of content must have a term in this vocabulary associated with it.
- Weight: The overall weight for this vocabulary in listings with multiple vocabularies.
Adding terms to a vocabulary
Once done defining the vocabulary, you have to add terms to it to make it useful. The options you see when adding a term to a vocabulary will depend on what you selected for related terms, hierarchy and multiple select. These options are:
- Term name: The name for this term. Example: Milk.
- Description: Description of the term that may be used by modules and feeds. This is synonymous with a "scope note".
- Parent: Select the term under which this term is a subset -- the branch of the hierarchy that this term belongs under. This is also known as the "Broader term" indicator used in thesauri.
- Synonyms: Enter synonyms for this term, one synonym per line. Synonyms can be used for variant spellings, acronyms, and other terms that have the same meaning as the added term, but which are not explicitly listed in this vocabulary (i.e. unauthorized terms).
- Weight: The weight is used to sort the terms of this vocabulary.
Displaying content organized by terms
In order to view the content associated with a term or a collection of terms, you should browse to a properly formed Taxonomy URL. For example, taxonomy/term/1+2. Taxonomy URLs always contain one or more term IDs at the end of the URL. You may learn the term ID for a given term by hovering over that term in the taxonomy overview page [nur für Admins] and noting the number at the end or the URL. To build a Taxonomy URL start with taxonomy/term/". Then list the term IDs, separated by "+" to choose content tagged with any of the given term IDs, or separated by "," to choose content tagged with all of the given term IDs. In other words, "+" is less specific than ",". Finally, you may optionally specify a "depth" in the vocabulary hierarchy. This defaults to "0", which means only the explicitly listed terms are searched. A positive number indicates the number of additional levels of the tree to search. You may also use the value "all", which means that all descendant terms are searched.
RSS feeds
Every term, or collection of terms, provides an RSS feed to which interested users may subscribe. The URL format for a sample RSS feed is taxonomy/term/1+2/0/feed. These are built just like Taxonomy URLs, [nur für Admins] but are followed by the word "feed".
- Login to post comments



