Overriding the breadcrumb

An easy way to Override the breadcrumb to use hook_breadcrumb in templete.php. In my profile page the user profile name was missing only “home” was getting displayed. i used to following code in templete.php :

function YOUR_THEME_NAME_breadcrumb($variables) {
$breadcrumb = $variables['breadcrumb'];
if(arg(0) == "user") {
$breadcrumb[]= drupal_get_title();
$output = '
</code>
<div class="breadcrumb">' . implode('>>', $breadcrumb) . '</div>
';
return $output;
}
}

One more way is : create a breadcrumb.tpl.php file in your theme folder and add following line:
This will only change the default symbol( >>) between breadcrumb string to !.

Advertisements