Closed (fixed)
Project:
Zen
Version:
6.x-1.0
Component:
PHP Code
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Sep 2009 at 17:55 UTC
Updated:
19 Nov 2009 at 13:20 UTC
I ran into an issue where setting breadcrumbs on Views pages (using custom breadcrumbs module) appended an empty separator to the breadcrumb.
I added a simple if/then statement to remove the separator when a title is empty. More details and code can be found here: http://drupal.org/node/581666
Here's the section specifically that I modified.
// Return the breadcrumb with separators.
if (!empty($breadcrumb)) {
$breadcrumb_separator = theme_get_setting('zen_breadcrumb_separator');
$trailing_separator = $title = '';
if (theme_get_setting('zen_breadcrumb_title')) {
$trailing_separator = $breadcrumb_separator;
$title = menu_get_active_title();
//Check for empty title and kill separator if necessary.
if($title == ''){
$trailing_separator = '';
}
}
elseif (theme_get_setting('zen_breadcrumb_trailing')) {
$trailing_separator = $breadcrumb_separator;
}
return '<div class="breadcrumb">' . implode($breadcrumb_separator, $breadcrumb) . "$trailing_separator$title</div>";
}
Comments
Comment #1
johnalbinGood catch!
I used a slightly more optimized approach, but I'll credit you with the fix in CHANGELOG.txt. :-)
Fixed in 6.x-1.x and 6.x-2.x.