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
  • Component Properties
  • Usage

Was this helpful?

  1. Components

Breadcrumb

Indicate the current page’s location within a navigational hierarchy that automatically adds separators via CSS.

PreviousButton GroupNextCard

Last updated 1 year ago

Was this helpful?

Component Properties

  • breadcrumb: An array containing the breadcrumb items. Each item should be an associative array with text and url properties. The url property can be null for the current page.

  • breadcrumb_utility_classes (optional): An array of additional CSS classes that will be added to the .breadcrumb element.

  • breadcrumb_attributes (optional): A drupal attributes array that can be used to add additional attributes to the .breadcrumb element.

Usage

Include the breadcrumb component in your Twig template and pass the necessary parameters:

Example 1: General usage:

{% include 'radix:breadcrumb' with {
  breadcrumb: [
    { text: 'Home', url: '/home' },
    { text: 'Blog', url: '/blog' },
    { text: 'Post Title', url: null }  // The current page
  ],
  breadcrumb_utility_classes: ['my-custom-class']
} %}

Example 2: Simple Drupal init:

{% include 'radix:breadcrumb' with {
  breadcrumb: breadcrumb,
} %}
Bootstrap docs