Drupal: .htaccess Access Deny
August 21, 2014 – 7:59 am | No Comment

In this article I will tell how to forbid access to certain resources for some clients. The instructions will include descriptions of different directives.

Read the full story »
CSS Templates

Contain reviews and news about CSS Templates.

Freebies

Contain freebies such as icons, graphics, headers and images for your websites.

Fun Stuff

Contains other fun stuff for entertainment or interesting site showcase.

How-To

Contain technical elaborations on some specific workarounds or common tweak.

Joomla Templates

Contains reviews and news about Joomla templates.

Home » How-To

Drupal: How to Change “Home” Text in Breadcrumbs

Submitted by on December 13, 2010 – 10:34 amNo Comment

In this article I would tell you how to change “Home” text in breadcrumbs.

Solutions:

  • Change translation for “Home” text

  • Redefine output of breadcrumbs in theme

Change translation for “Home” text

So, you need to find the required string among the existing translation strings.

  • Open “String management”:
    • Drupal 6.x: /admin/build/translate/search
    • Drupal 5.x: /admin/settings/locale/string/search
  • Specify a string or its part
  • Click “Find” button
  • Click “Change” link near the required string
  • Make your changes
  • Save changes

This is the fastest solution. But if you will remove this language, you would repeat these actions.

Redefine output of breadcrumbs in theme

This code would remove the first element (“Home” text) from the  breadcrumbs and replace it with different text $home_title and the link to a home page. In addition,  breadcrumbs will not be shon on a home page (see !drupal_is_front_page() ).

You should insert the code to template.php file of your current theme:

Drupal 5.x

function phptemplate_breadcrumb($breadcrumb) {
$home_title=”Главная”;
$breadcrumb[] = drupal_get_title(); //Добавить заголовок текущей страницы
array_shift($breadcrumb); //Удалить первый элемент (“Главная”)
if (!empty($breadcrumb) && !drupal_is_front_page()) {
return ‘<div class=”breadcrumb”>’. l($home_title, drupal_get_normal_path(variable_get(‘site_frontpage’, ‘node’))) . ‘&raquo; ‘. implode(‘ &raquo; ‘, $breadcrumb).'</div>';
}
}

Leave a comment!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.