ok, I tried to found it but wasn't sure how to remove it. On all the themes that I am using, they show "Home" link and if I go to Admin page than it will show Home >> Admin link (it is like breadcrumb).

I want to get rid of it (but I don't want to edit the theme code) and I am sure there is some easy way of getting it removed. Can someone guide me on this ?

Thanks

Comments

leonk’s picture

Using themename_breadcrumb($breadcrumb) in the template.php file in your theme folder can give you access to the breadcrumb array.

All you need are two things. The first thing is that you need a file called template.php in your theme's folder. I don't think this is created by default so just create template.php and place it in your theme's folder if you don't already have one. In the file be sure to have an open php tag ("<?php").

The second is the proper function to override the breadcrumb, in this case themename_breadcrumb($breadcrumb). The following code (found on http://drupal.org/node/72850#comment-154029) will eliminate the "Home" link from the breadcrumb.

function themename_breadcrumb($breadcrumb) {
  if (!empty($breadcrumb)) {
    array_shift($breadcrumb); //gets rid of "Home"
    return '<div class="breadcrumb">' . implode('&nbsp;&raquo;&nbsp;', $breadcrumb) . '</div>';
  }
}

Just copy and paste the above code (with exception of the php tags) into your template.php file. Then, replace "themename" with your theme's name, and you will be good to go.

pollyplummer’s picture

This works for me to remove the home link but it turns the text inside my page node into a giant link. Am I missing something? Any help would be greatly appreciated.

"Two things a man cannot hide: that he is drunk, and that he is in love."
-Playwright Antiphanes

aharown07’s picture

Works for me with no problems, but I did replace "themename_breadcrumb" with "phptemplate_breadcrumb"
Maybe that will work for you. I only made the change because my existing template.php file breadcrumb code was written that way. Probably also works to put your themename in place of "themename"

Berto’s picture

Or, for SEO purposes, you want to change Home to something else. Here's a SUPER easy one to put into your template.php file:

/**
 * Breadcrumb Fixer - Anytime the 0th element says "Home", change it to
 * "Supplements"
 */
function mytheme_breadcrumb($breadcrumb) {
  if (!empty($breadcrumb)) {
    $breadcrumb[0] = str_replace("Home", "Supplements", $breadcrumb[0]);
    return '<div class="breadcrumb">'. implode(' » ', $breadcrumb) .'</div>';
  } 
}

Of course you probably won't want to use supplements on your site... :)

- Berto
-- Founder, PricePlow - http://www.PricePlow.com
--- Price Comparisons for Supplements, Vitamins, and diet products