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

kenorb’s picture

BTW. 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

    $options = new breadcrumb_doc_class_CrumbsOptions($this);
    $options->title = t('My title');
    $options->nolink = TRUE;
    $item->title = serialize($options);
kenorb’s picture

Example:
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:

  function decorate__user___notifications_subscriptions($path, &$item) {
    $item->skipInBreadcrumb();
  }

Now the last element is a link.

donquixote’s picture

Is 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.

donquixote’s picture

Status: Active » Postponed (maintainer needs more info)

..

kenorb’s picture

What 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

donquixote’s picture

Idea: 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.

----

What 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.

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.

donquixote’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

Probably this no longer applies in latest versions and D7..