I'm currently writing a module that uses theme('breadcrumb') outside of theme('page'). i.e. I have a custom menu callback that also outputs the breadcrumbs.
At present, because zen_preprocess_page is not called, my breadcrumbs do not have the title of the current page appended on the end. I tried adding the title to the end of the breadcrumb array, and while this showed the title, it also resulted in the trailing separator to be shown after it.
I tracked this down to the title being 'injected' into the breadcrumbs in zen_preprocess_page. Whilst I could do the same, I do not want to resort to this method.
I feel it would make more sense to append the title in zen_breadcrumb instead.
Something like:
// Return the breadcrumb with separators
if (!empty($breadcrumb)) {
$breadcrumb_separator = theme_get_setting('zen_breadcrumb_separator');
$trailing_separator = (theme_get_setting('zen_breadcrumb_trailing') || theme_get_setting('zen_breadcrumb_title')) ? $breadcrumb_separator : '';
$return = '<div class="breadcrumb">' . implode($breadcrumb_separator, $breadcrumb) . $trailing_separator;
if (theme_get_setting('zen_breadcrumb_title')) {
$return .= drupal_get_title();
}
$return .= "</div>";
return $return;
}
Does this seem like a reasonable request? This way, theme('breadcrumb') can be called from anywhere, and will always return the same HTML.
Comments
Comment #1
johnalbinThis issue was fixed before 6.x-1.0 was released.