Where to change the "Home" breadcrumb link?

Jboo - May 16, 2008 - 13:50

I've searched for an answer to this and can find out how to change the breadcrumb trails to show current pages, etc. However, all i'm looking to do is change the "Home" text to something else. I'm using taxonomy breadcrumb module but can't get it to work on taxonomy pages so i'm looking to change the home text manually.

Can someone point out where this can be changed?

Thanks for any help.

Using a phptemplate theme?

Alan D. - May 16, 2008 - 14:20

Hi

Just tried this one Drupal 6. It seems like the easiest way of modifying the home link.

<?php
function phptemplate_breadcrumb($breadcrumb) {
  if (!empty(
$breadcrumb)) {
   
// remove the Home link
   
$old_home_link = array_shift($breadcrumb);
   
// insert the new link
   
array_unshift($breadcrumb, l(t('Front page'), '<front>'));
    return
'<div class="breadcrumb">'. implode(' » ', $breadcrumb) .'</div>';
  }
}
?>

In Drupal 5, this should work straight away, (fingers crossed), but on 6 you need to flush the cache to register the new function.

You may need to rename phptemplate_breadcrumb to THEMENAME_breadcrumb

Alan Davison
www.caignwebs.com.au

Great, thanks Alan, that

Jboo - May 16, 2008 - 15:18

Great, thanks Alan, that works perfect!

Thank you very much

shubhada - November 11, 2009 - 17:13

Thank you very much Alan,
awesome... work...

 
 

Drupal is a registered trademark of Dries Buytaert.