1 template.php seven_breadcrumb($variables)

Override theme function for breadcrumb trail

File

core/themes/seven/template.php, line 122
Preprocess functions and theme function overrides for the Seven theme.

Code

function seven_breadcrumb($variables) {
  $breadcrumb = $variables['breadcrumb'];
  $output = '';
  if (!empty($breadcrumb)) {
    $output .= '<nav class="breadcrumb" aria-label="' . t('Website Orientation') . '">';
    $output .= '<ol>';
    // IE8 does not support :first-child and :last-child selectors, so we need
    // to add classes.
    foreach ($breadcrumb as $n => $item) {
      $classes = array();
      if ($n === 0) {
        $classes[] = 'first';
      }
      if ($n === count($breadcrumb) - 1) {
        $classes[] = 'last';
      }
      $class_attribute = $classes ? ' class="' . implode(' ', $classes) . '"' : '';
      $output .= "<li$class_attribute>$item</li>";
    }
    $output .= '</ol>';
    $output .= '</nav>';
  }
  return $output;
}