You are here

function theme_easy_breadcrumb in Easy Breadcrumb 7

Same name and namespace in other branches
  1. 6 easy_breadcrumb.module \theme_easy_breadcrumb()

Theme function for the breadcrumb.

Parameters

Assoc $variables: arguments

Return value

string HTML for the themed breadcrumb.

1 theme call to theme_easy_breadcrumb()
_easy_breadcrumb_block in includes/easy_breadcrumb.blocks.inc
Obtains the 'easy_breadcrumb' block.

File

./easy_breadcrumb.module, line 142
The Easy Breadcrumb module provides a block to be embedded in any page, typically at some place near the page's header. Easy Breadcrumb uses the URL (path alias) and the current page's title (when available) to obtain the breadcrumb's…

Code

function theme_easy_breadcrumb($variables) {
  $breadcrumb = $variables['breadcrumb'];
  $segments_quantity = $variables['segments_quantity'];
  $separator = $variables['separator'];
  $html = '';
  if ($segments_quantity > 0) {
    $html .= '<div class="easy-breadcrumb">';
    for ($i = 0, $s = $segments_quantity - 1; $i < $segments_quantity; ++$i) {
      $html .= '<span class="easy-breadcrumb_segment-wrapper">' . $breadcrumb[$i] . '</span>';
      if ($i < $s) {
        $html .= '<span class="easy-breadcrumb_segment-separator"> ' . $separator . ' </span>';
      }
    }
    $html .= '</div>';
  }
  return $html;
}