I am using Drupal 6.17 and want to get rid of "HOME" in the breadcrumb output...
eg:
$breadcrumb= PRODUCTS // SOFTWARE // FEATURES
instead of
HOME // PRODUCTS // SOFTWARE // FEATURES
Follow the steps below: From your WordPress Dashboard, go to Appearance > Customize > Content > Page Header section. Switch off the Enable Breadcrumbs option to remove it.
Here's a Drupal 7 version:
/**
* Get rid of Home in breadcrumb trail.
*/
function <themename>_breadcrumb($variables) {
$breadcrumb = $variables['breadcrumb'];
if (!empty($breadcrumb)) {
// Provide a navigational heading to give context for breadcrumb links to
// screen-reader users. Make the heading invisible with .element-invisible.
$output = '<h2 class="element-invisible">' . t('You are here') . '</h2>';
array_shift($breadcrumb); // Removes the Home item
$output .= '<div class="breadcrumb">' . implode(' » ', $breadcrumb) . '</div>';
return $output;
}
}
Override the breadcrumb in your theme's template.php file:
/**
* Return a themed breadcrumb trail.
*
* @param $breadcrumb
* An array containing the breadcrumb links.
* @return a string containing the breadcrumb output.
*/
function phptemplate_breadcrumb($breadcrumb) {
if (!empty($breadcrumb)) {
array_shift($breadcrumb); // Removes the Home item
return '<div class="breadcrumb">'. implode(' › ', $breadcrumb) .'</div>';
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With