function theme_breadcrumb

Returns HTML for a breadcrumb trail.

Parameters

$variables: An associative array containing:

  • breadcrumb: An array containing the breadcrumb links.

Related topics

3 theme calls to theme_breadcrumb()
ForumTest::verifyForums in drupal/core/modules/forum/lib/Drupal/forum/Tests/ForumTest.php
Verifies that the logged in user has access to a forum node.
ForumTest::verifyForumView in drupal/core/modules/forum/lib/Drupal/forum/Tests/ForumTest.php
Verifies the display of a forum page.
template_process_page in drupal/core/includes/theme.inc
Process variables for page.tpl.php

File

drupal/core/includes/theme.inc, line 1841
The theme system, which controls the output of Drupal.

Code

function theme_breadcrumb($variables) {
  $breadcrumb = $variables['breadcrumb'];
  $output = '';
  if (!empty($breadcrumb)) {
    $output .= '<nav role="navigation" class="breadcrumb">';

    // Provide a navigational heading to give context for breadcrumb links to
    // screen-reader users. Make the heading invisible with .element-invisible.
    $output .= '<h2 class="element-invisible">' . t('You are here') . '</h2>';
    $output .= '<ol><li>' . implode('</li><li>', $breadcrumb) . '</li></ol>';
    $output .= '</nav>';
  }
  return $output;
}