Active
Project:
Blueprint
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Dec 2010 at 02:55 UTC
Updated:
11 Dec 2010 at 13:33 UTC
The breadcrumb div prints out even if it is empty.
Code in template.php is:
<?php
function blueprint_breadcrumb($breadcrumb) {
// Don't add the title if menu_breadcrumb exists. TODO: Add a settings
// checkbox to optionally control the display.
if (!module_exists('menu_breadcrumb') && count($breadcrumb) > 0) {
$breadcrumb[] = drupal_get_title();
}
return '<div class="breadcrumb">'. implode(' › ', $breadcrumb) .'</div>';
}
?>
Probably should be along the line of:
<?php
function blueprint_breadcrumb($breadcrumb) {
// Don't add the title if menu_breadcrumb exists. TODO: Add a settings
// checkbox to optionally control the display.
if (!module_exists('menu_breadcrumb') && count($breadcrumb) > 0) {
$breadcrumb[] = drupal_get_title();
}
return empty($breadcrumb) ? '' : '<div class="breadcrumb">' . implode(' › ', $breadcrumb) . '</div>';
}
?>
Comments
Comment #1
finex commentedThe fix is correct