Current the html output of breadcrumb is

<div class="breadcrumb"><a href="/">Home</a> » <a href="/archive">Monthly archive</a> » May 2010</div>

I want to add a span tag around the anchor text , ie

<div class="breadcrumb">
  <a href="/"><span>Home</span></a> » <a href="/archive"><span>Monthly archive</span></a> » May 2010</div>

Comments

alisamar’s picture

subscript

prajaktam’s picture

In the template.php file of your theme add the following function or if its already there then modify it as follows:

/**
 * Return a themed breadcrumb trail.
 *
 * @param $breadcrumb
 *   An array containing the breadcrumb links.
 * @return a string containing the breadcrumb output.
 */
function phptemplate_breadcrumb($breadcrumb) {
  if (!empty($breadcrumb)) {
    foreach($breadcrumb as $k => $v) {
      $explode1 = explode('">',$v);
      $explode2 = explode('</',$explode1[1]);
      $new_breadcrumb[] = $explode1[0] . '"><span>' . $explode2[0] . '</span></a>';
    }
    return '<div class="breadcrumb">'. implode(' › ', $new_breadcrumb) .'</div>';
  }
  }

Clear the cache and try.

Thanks,
Prajakta