Drupal Radix Theme
  • Introduction
    • Overview & Support
  • Installation
    • Requirements
    • Getting Started
    • Setup with ddev
  • Understanding Radix
    • Individual files and directories
    • Bootstrap Build
    • Bootswatch
  • Working with the components
    • Components: Intro
    • Components: A deep dive
    • An example component
    • The drupal-radix-cli
    • Copy and modify a component
  • Components
    • Accordion
    • Alerts
    • Badge
    • Block
    • Buttons
    • Button Group
    • Breadcrumb
    • Card
    • Carousel
    • Close button
    • Comment
    • Collapse
    • Details
    • Dropdown menu
    • Field
    • Field Comment
    • Fieldset
    • Figure
    • Form
    • Form: Element
    • Form Element Label
    • Form Element: Radio Checkbox
    • Heading
    • HTML
    • Image
    • Input
    • List group
    • Local Tasks
    • Media
    • Modal
    • Nav
    • Nav Item
    • Navbar
    • Navbar Brand
    • Node
    • Offcanvas
    • Page
    • Page: Content
    • Page: Footer
    • Page: Navigation
    • Page: Title
    • Pagination
    • Progress
    • Radios
    • Region
    • Select
    • Spinners
    • Table
    • Taxonomy
    • Textarea
    • Toasts
    • Tooltips
    • User
    • Views: view
    • Views: view--grid
    • Views: view--table
    • Views: view--unformatted
  • Misc
    • Migration and upgrading
    • Roadmap
    • Credits & Contributions
Powered by GitBook
On this page
  • Key Features
  • Customization Options
  • Available Variables
  • Blocks
  • Usage

Was this helpful?

  1. Components

Taxonomy

A component template for rendering taxonomy entities.

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

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

Last updated 9 months ago

Was this helpful?