Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The last breadcrumb for all taxonomy terms are now "Taxonomy term", which is not very useful, when zen_breadcrumb_title is on. It used to be the title of the term in beta3.
Examples:
1.0: the breadcrumb for taxonomy/term/2 is "Home › Taxonomy term"
1.0-beta3: the breadcrumb for taxonomy/term/2 was "Home › Title"
I've noticed that these lines were removed from zen_preprocess_page() in template.php:
// Add an optional title to the end of the breadcrumb.
if (theme_get_setting('zen_breadcrumb_title') && $vars['breadcrumb']) {
$vars['breadcrumb'] = substr($vars['breadcrumb'], 0, -6) . $vars['title'] . '</div>';
}
Comment | File | Size | Author |
---|---|---|---|
#7 | title-in-breadcrumb-374349-7.patch | 788 bytes | JohnAlbin |
Comments
Comment #1
ball.in.th CreditAttribution: ball.in.th commentedIt seems to work better if template.php is changed like this:
and add the code above back.
Comment #2
JohnAlbinMarked #405444: "Forum" appears instead of container or forum name in breadcrumb as a dupe of this one.
And, yeah, that's a bug alright. Looks like I didn't test #343945: Fix zen_breadcrumb_title setting to use proper menu_get_active_item() enough. :-(
Comment #3
Edlund CreditAttribution: Edlund commentedI had the problem with views in general and these two pieces of code solved the problem, so now the bread crumb looks right both for page/story nodes and for views.
Comment #4
aharown07 CreditAttribution: aharown07 commentedI'm not clear on where to put the code... I'm using a subtheme based on zen classic, if that matters
Comment #5
aharown07 CreditAttribution: aharown07 commentedOK, comparing 1.0 beta3, I can tell that the lines in the original post go immediately after
function zen_preprocess_page<code(&$vars, $hook) {
and before//add conditional stylesheets
Found the other also. It begins at the commented line
//$trailing_separator = $title = '';
I can verify that these changes also produce very good results in the forums.
Comment #6
Jolidog CreditAttribution: Jolidog commentedI don't know if it's related, or if I should open a new issue, but the breadcrumbs are showing a trailing when viewing a view without a title defined.
I know there are problems with views and breadcrumbs. I'm trying to solve them using the custom breadcrumb module, but the behavior indicated above happens without any other module interfering with the breadcrumbs.
Should there be a check to see if a view has a title, before adding a trailing in the end?
I don't know of any other content that exists without a title but this probably should be a general setting and not dependent on views.
Comment #7
JohnAlbinFixed in HEAD (zen 6.x-2.x).
Here's the patch for DRUPAL-6--1.
Comment #8
JohnAlbinFixed in zen 6.x-1.x-dev (once it gets automatically re-rolled in 12 hours).