# Taxonomy

### Key Features

* **Dynamic Class Application**: Automatically applies classes based on taxonomy term characteristics like vocabulary and view mode.
* **Vocabulary and View Mode Specific Styling**: Facilitates unique styling for different vocabularies and view modes.
* **Flexible Content Rendering**: Allows for customizable rendering of taxonomy term content and fields.

### Customization Options

* **Vocabulary-Based Styling**: Customize the appearance of terms based on their vocabulary.
* **View Mode Adaptation**: Adjust styling for different view modes like 'full', 'teaser', etc.
* **Custom Attributes**: Apply custom attributes to the taxonomy wrapper, title, and content areas.

### Available Variables

* `url`: URL of the current term.
* `name`: (optional) Name of the current term.
* `content`: Items for the content of the term (fields and description).
* `attributes`: HTML attributes for the wrapper.
* `page`: Flag for the full page state.
* `term`: The taxonomy term entity.
* `view_mode`: View mode, e.g. 'full', 'teaser', etc.

### Blocks

The template provides several blocks that can be extended or overridden:

* `taxonomy_title_prefix`
* `taxonomy_title`
* `taxonomy_title_suffix`
* `taxonomy_content`

These blocks allow for fine-grained control over the rendering and overriding of different parts of the taxonomy term component.

### Usage

```twig
{%
include 'radix:taxonomy' with {
  name: term_name,
  url: term_url,
  content: term_content,
  attributes,
  title_attributes,
  content_attributes,
  view_mode,
  term: taxonomy_term_entity,
}
%}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.trydrupal.com/radix/components/taxonomy.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
