Closed (fixed)
Project:
Crumbs, the Breadcrumbs suite
Version:
6.x-1.x-dev
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Nov 2010 at 15:28 UTC
Updated:
23 Aug 2012 at 21:43 UTC
Did:
$item->skipInBreadcrumb();
for one of the methods.
After that my last element has no `active` class.
It cause some glyph theme problems in CSS:
.breadcrumb a {
background: transparent url(../images/layout/bg-links-arrow.png) no-repeat 100% 50%;
padding-right: 12px;
}
.breadcrumb .active {
background: none;
color: #000;
}
Comments
Comment #1
kenorb commentedBTW. Another issue: When skipped the last element which is not link, the last item became the link.
Workaround: http://drupal.org/node/926266#comment-3513384
Comment #2
kenorb commentedExample:
URL: user/205/notifications/subscriptions
generates breadcrumb:
But I don't want so long breadcrumb, because I've the direct link to that page from 'User account'.
I'm skipping them by:
Now the last element is a link.
Comment #3
donquixote commentedIs it really a good idea to skip the last item, only to have a shorter breadcrumb?
Would it not be better to replace some items in the middle by "..." ?
The method to do that would be decorateTrail() (1.x branch) or decorateBreadcrumb() (2.x branch).
Here you get the full breadcrumb data, and can react to the number of items, or the number of characters.
Actually I did this in a project where I used this module.
Comment #4
donquixote commented..
Comment #5
kenorb commentedWhat about nodes where you have duplicate titles? Taxonomy + node title.
You have to remove the last item, if you don't want to repeat the name.
i.e. #967672: Duplicated crumbs
Comment #6
donquixote commentedIdea: Give the last item a "last" class, no matter if it is "active" (= identical with the current page).
Then you can decide in your theme and CSS what you want to do with this type of items.
----
The scenario I would imagine: You have a vocabulary where each term has an associated node with the same name, to allow a description and other info to be added to this category. I have seen this kind of architecture, and would consider it as a solution in some cases.
Imagine you have a taxonomy/term/123 page, and the associated node/345 page. Both are named "Financial reports". The term is used to categorize all financial report nodes. The node is used to explain what financial reports are about.
The term page is the breadcrumb parent of the node page. So the breadcrumb would look like this:
Home > Financial reports > Financial reports.
I agree this is not desirable.
So what about
Home > Financial reports > Explanations.
or
Home > Financial reports > About
or
Home > Financial reports > About financial reports.
You can achieve this by either giving the node a different title (you might not want to do this), or by overriding the title of the last breadcrumb item using the findTitle() method.
Comment #7
donquixote commentedProbably this no longer applies in latest versions and D7..