Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By Robardi56 on
Hi,
how can I change the "home" txt in generated breadcrumb ?
Thanks,
Brakkar
Comments
Here's how...
Find the following line in menu.inc:
And change 'Home' to whatever:
Hope this helps.
bad idea to modify core
It's a bad idea to modify core files b/c it will make upgrading much messier. 2 alternatives:
1. Use the locale module to create your own "language". See http://drupal.org/node/24593 for instructions.
2. Use theming. If you wanted to do something more complicated like, say, getting rid of the Home link altogether, you could override theme_breadcrumb. For example, you could do something like:
I heard that drupal 6 might have hook_something_alters for more things, so possibly in drupal 6, there might be a hook_breadcrumb_alter.
=-=
This handbook page may help as well : http://drupal.org/node/72850 which is where gwen's example comes from, i believe.
How to do this for drupal 6
Hi all,
Sorry, I still can't figure out how to do this in Drupal 6 without modifying the core. I just want to change the text of "Home" to "Library Home".
Can anyone help?
Thanks!
-Tim
=-=
it may be possible with the string overrides.module.
Thanks!
Woot! The String Overrides module totally worked. Many thanks VeryMisunderstood!
-Tim
use theme_breadcrumb()
You could override the theme_breadcrumb() function in your theme's template.php file, adding a line to modify the first link in the $breadcrumb array:
thanks for that
@jeffschuler
thanks for that, worked like a charm at first but then some errors for me:
-white screen of death on login, logout and use of search form
-error: Cannot modify header information - headers already sent ...
-error: session_regenerate_id() ...
solution in this case:
using notepad++ needed to set the template.php format from 'Encode with ANSI' to 'Encode with UTF-8 without BOM' to get rid of the ? in the diamond (visible in ff) and show the >>, though may have avoided this by using ' » ' can't be sure.
'without BOM' is important: http://drupal.org/node/1424
so a long search for a fix, and i needed some help, but this snippet eventually worked well in this case. thanks!
working example
Simple
Go to breadcrumbs module and change it . 3 second :) . joomla 1.5x
Changing breadcrumb home text and link
I know this is an old thread, but someone might be searching for a way to do this simply. If you do not want to add yet another module and would like to change the home link in breadcrumbs in D7, the following snippet which uses hook_menu_breadcrumb_alter added to one of your modules should do the trick:
function yourmodule_menu_breadcrumb_alter(&$active_trail, $item){
$active_trail[0]['title'] = 'Your Title';
$active_trail[0]['href'] = 'path to your page';
}
Happy Drupaling!
Hollye Merton
Application Software Specialist
This worked perfectly. Thanks
This worked perfectly. Thanks hollyfox!
Thanks
Thanks, exactly what I was looking for.