By gavin.james on
I'm currently testing out Drupal 6 Beta 3 in anticipation of the final release, but I'm having a bit of trouble with breadcrumbs for nodes.
In Drupal 4/5 if I have a menu structure (of pages):
About
+-- FAQs
+-- Donations
+-- Etc
Then when visiting FAQs/Donations/Etc I would get a breadcrumb trail of "Home > About".
Unfortunately with Drupal 6 this I just get a breadcrumb trail of "Home". Has the breadcrumbs work been changed in Drupal 6 or is this a bug?
I notice with things like the forum, blogs and the administration section that the breadcrumbs display fine. Just doesn't seem to work on pages I create.
Any ideas?
Comments
Hmm...
OK, it seems that breadcrumbs DO work *IF* the menu items are created under the Navigation menu. Menu structures created under (for example) the Primary Links or Secondary Links menus do not generate breadcrumbs.
Does anyone know if this is intended, or if it's a bug?
Menu Breadcrumb
I have no idea about intended behaviour, however, after searching for an answer to this exact question myself I was pointed to the Menu Breadcrumb module.
Basically, Drupal uses the "Navigation" menu as the input for the breadcrumb by default. This module sets the breadcrumb to the active menu item, whichever that may be. Quite easy, quite elegant and quite useful.
Problem still happening
I am running on Drupal 6.2 and have this exact same problem. I dug though menu.inc and found this code snippet:
/**
* Set (or get) the active menu for the current page - determines the active trail.
*/
function menu_set_active_menu_name($menu_name = NULL) {
static $active;
if (isset($menu_name)) {
$active = $menu_name;
}
elseif (!isset($active)) {
$active = 'navigation';
}
return $active;
}
Breadcrumbs are only generated from the "active menu", and if there is no active menu set, it defaults to the navigation menu.
Is this a bug, or an intended feature?
Cheers
Wes.
May be a bug (i think :)
May be a bug (i think :) )
I'm try to fix this with patch http://drupal.org/node/263492 , but how can i to inform mantainer of menu system to check this?
I also have this problem
Thanks for the tip, this was driving me nuts setting up my new site, as I saw it was working correctly in Drupal 5.7 but not working in 6.2 - and I'd rather use the latest stable.
Can anyone confirm if this is actually a bug or intended behavior? Or is it perhaps fixed in 6.x-dev?
Also have this problem
Noticed it in the upgrade from 5.7 to 6.4.
I'm using menu_set_active_menu_name() to choose the active menu, but am curious what the proper way is.
THANK YOU. using the menu
THANK YOU. using the menu breadcrumb solved my issue
Breadcrumbs is working.
IMHO, this is the intended functionality of breadcrumbs, and it is not a bug, since its purpose is to help with navigation. On the other menu structures, we could provide shortcuts for Navigation items that are buried in the deeper levels of the menu tree.
For example:
Navigation menu
> Menu 1
>> Menu 1-1
>>> Menu 1-1-1
> Menu 2
Shortcuts menu
> Shortcut to menu 1-1-1 (same path with Menu 1-1-1)
Clicking the only item on the shortcuts menu would give a breadcrumb of:
Menu 1 > Menu 1-1
Disagree
Using the navigation menu makes sense if you have a ton of auth users who are using interactive features that are listed in the navigation menu. However, the vast majority of sites do not have that much interactive content. Even those more community oriented, most users are trained to think in terms of the primary links and see the user navigation menu as only secondary (or tertiary) to where they are in the site.
So, if the primary links menu really is "primary" then breadcrumbs should grant that precedence over the navigation menu.
I have the same problem. I
I have the same problem.
I agree it should be considered as a bug.
It's totally a
It's totally a bug.
Functionality that used to be present has been removed.
The navigation menu is a real pain to use as the main site menu, because of all the cruft modules place into it. Primary links is the best thing for breadcrumbs -- even this very site does that!
Is there an issue open for this on D6 core?
I'll look to see if there is
I'll look to see if there is an issue filed for this. Someone else must have discussed it since it is a fairly large change from D5.
Edit: Found this: #258361: Include Menu Breadcrumb in Drupal core
More than a year later
And it's still a problem with Drupal 6.17. Doesn't make sense to me. Breadcrumbs should show the trail of the menu that the current page is in. At least the Menu Breadcrumb module fixes it.
Another active trail issue
Please read this too: #732370: Go as deep as possible when building the active trail.
I have the same problem, it
I have the same problem, it was only linking the "Home" rest of the string was just a text and taking full title of the node.
I used a plugin available called menu_breadcrumb, it solved my problem. Now breadcrumb text is linked to correct node
Here is the link for plugin.
http://drupal.org/project/menu_breadcrumb