How to customize the Drupal Breadcrumb with relevant keywords for SEO

Search Engines look for keywords within the page content and the more you have, the higher the density. The prominence of a keyword is further increased if that word appears as linked-text. The reference to the homepage in a Web CMS depended website, or aven in static websites where the producer/designer manually implements breadcrumbs is the focus of this document.

Being that the 'home' link is always visible (unless you wisely exclude it from the homepage), this link will appear very frequently and you will be squandering this top linked position (a delicacy for search engines looking for words to associate with your site) by leaving it to display the word 'home'.

What to do

The recommended step is to change the text from 'Home' to a keyword that you would like to associate with your website. You can therefore change that word to the name of your website or a 2-3 word phrase that really represents what you do without confusing the user.

How to implement this in Drupal

The function that controls that composition of the breadcrumb is found in includes/menu.inc file. However, it is important NOT to edit the core files, and to instead override the function in your theme. You can see a complete list of all themable functions in the Drupal theme developers library

function your_theme_name_menu_get_active_breadcrumb() {
$menu = menu_get_menu();

$links[] = l(t('Web CMS Producer'), '');

$trail = _menu_get_active_trail();
foreach ($trail as $mid) {
if ($menu['items'][$mid]['type'] & MENU_VISIBLE_IN_BREADCRUMB) {
$links[] = menu_item_link($mid);

___________________

Update

Since this document was first written, a number of modules has been written to enable even more granular cotnrol of the breadcrumb that is generated by Drupal. To mention one, Taxonomy_breadcrumb is one such module that provides some additional flexibility, and even enables breadcrumbs to be based on the taxonomy vocabulary and term hierarchy of a given node.

Valid XHTML 1.0 Strict
This site is accepts Oped ID authentication for login
This Website is Built Using Semantic Markup and Cascading Style Sheets (CSS)
Some usage rights are reserved, please contact us for approval before using it