Closed (fixed)
Project:
Drupal core
Version:
6.x-dev
Component:
menu system
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
26 Apr 2007 at 06:21 UTC
Updated:
22 Dec 2007 at 05:11 UTC
Jump to comment: Most recent file
Comments
Comment #1
chx commentedThis in itself is not a biggie, but I will only fix when the multiple menus are done, I do not want to break menu builder while Peter is in it.
Comment #2
theborg commentedWhy don't just make an option?. Maybe in theme settings: Toggle Display: Current page breadcrumb.
I've been patching 5.1 core to get the current page breadcrumb trail just like firefox site.
Comment #3
dwwyeah, i agree that making this flexible would be cool.
Comment #4
theborg commentedThis patch modifies:
menu.inc,
theme.inc,
system.module.
It includes an option on theme settings to toggle display of the last breadcrumb trail (or current breadcrumb).
Comment #5
moshe weitzman commentedinstead of the terse t('Last breadcrumb') text, we could use t('Current page displays in breadcrumb')
Comment #6
dwwi didn't realize this, but other menu changes that went in had the side effect of fixing the original bug i reported. so, this issue is now just a feature request to make this behavior configurable (which would still be cool).
moshe is right: t('Current page displays in breadcrumb') would be a lot better.
however, this patch needs work for other reasons, too. i just tried it out, and the behavior of the breadcrumb trail is very inconsistent on admin pages that involve tabs. something about the logic in there is wrong. for example, with the patch applied and the new setting enabled, visit:
?q=admin/build/path
Home › Administer › Site building › URL aliasesso far, so good.
now, click on the "List" tab (the default), which sends you to:
?q=admin/build/path/list
Home › Administer › Site buildinghuh? i'd expect "URL aliases" to be there, since that's the current page.
then, click on the "Add alias" tab:
?q=admin/build/path/add
Home › Administer › Site building › URL aliasesthat's closer, but "URL aliases" in this case brings you to the "parent" page, not the current page, and it seems like the goal of this feature is to make it so that the final thing in the breadcrumb always brings you where you are.
perhaps the goal of this feature isn't well thought-out regarding pages with tabs and subtabs, but certainly the ?q=admin/build/path/list case needs to be fixed to put "URL aliases" in there correctly.
also, minor code style issue -- as the last entry in each array, both of these lines should have a trailing comma:
just because the code already there is wrong doesn't mean this patch should perpetuate the error. ;) thanks.
Comment #7
dwwi took a brief look at the logic, and am confused by what menu_get_active_trail() is returning in the various cases of tabs and subtabs i outlined in the above comment. :( i don't really have time to dive into this deeply, so'll leave this in the hands of someone who cares more. however, here's a reroll that at least changes the setting name and fixes the code style issues. ;)
Comment #8
theborg commentedThanks for the corrections, I'm looking for a resolution.
Comment #9
theborg commentedThis patch modifies:
menu.inc,
theme.inc,
system.module.
Updated variable name to: current_breadcrumb.
Changed menu_get_active_breadcrumb to display current breadcrumb always in tabs.
Comment #10
pwolanin commentedThe logic involved in building the tabs is a bit tricky, and it a bit divergent in terms of breadcrumb vs. tabs on the page.
For the breadcrumb, we put callbacks in the {menu_links} as hidden links, so that they are in the appropriate place in the menu links hierarchy. However, this only works or paths with no variable arguments and it cannot work for paths like node/%, since these can appear many places in the menu.
The patch looks like a reasonable start if this is a desirable feature. As you can see form the logic, it's a bit tricky to determine when to NOT show the last link (array_pop).
Also, this code could use work:
among other things, probably the latter part should be a theme function, and should associate some class with the span.
Comment #11
theborg commentedthe latter part should be a theme function
I didn't include a class because the span tag can be styled within breadcrumb divisor: div.breadcrumb span {font-weight: bold}, but maybe it woud be easy to have one.
Comment #12
chx commentedDunno what's the correct status for this, other issues dealt / deal with breadcrumbs, so it's eihter fixed or duplicate.
Comment #13
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.