function theme_breadcrumb

theme_breadcrumb($variables)

Returns HTML for a breadcrumb trail.

Parameters

$variables: An associative array containing:

  • breadcrumb: An array containing the breadcrumb links.

Related topics

File

includes/theme.inc, line 1897
The theme system, which controls the output of Drupal.

Code

function theme_breadcrumb($variables) {
  $breadcrumb = $variables['breadcrumb'];

  if (!empty($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 .= '<div class="breadcrumb">' . implode(' » ', $breadcrumb) . '</div>';
    return $output;
  }
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/includes!theme.inc/function/theme_breadcrumb/7.x