Problem

  1. You might need to display an unlinked current page title on every breadcrumbs.
  2. You might want to preserve the default breadcrumb generation on some pages.
  3. When using path breadcrumbs, not all pages on your site might have a variant and you might not want to create variant for some automated pages.

Solution

Introduce a configurable setting that force the appending of the current page title on page not currently being managed by path_breadcrumbs (no variant hit).

Comments

ptsimard created an issue. See original summary.

ptsimard’s picture

Status: Active » Needs review
FileSize
2.04 KB
sylus’s picture

Status: Needs review » Fixed

Looks good to me and like that it is opt-in behavior.

Committed and attributed, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

ptsimard’s picture

Status: Closed (fixed) » Needs review
FileSize
2.23 KB

@sylus, it seems you didn't commit this patch after all.

Here is a new patch with an improvement:

It now makes sure the last breadcrumb item is a link before appending a non-link (prevents appending a non-link to a non-link).

I noticed it when a page was being managed by panels_breadcrumbs module instead of path_breadcrumb. I didn't want to introduce a dependency check on panels_breadcrumbs so I think this solution works well for this (and potentially other) edge case.

ptsimard’s picture

FileSize
2.24 KB

Totally had a logic error in patch 5, here is #6

sylus’s picture

Status: Needs review » Fixed

Ah sorry not sure what happened, this time it is now committed. :)

https://github.com/wet-boew-wem/wetkit-breadcrumbs/commit/aad181bf8e096b...

Committed and attributed.

  • sylus committed 810cfc1 on 7.x-4.x authored by ptsimard
    Fixed WetKit Breadcrumbs for Issue #2768899 by ptsimard: Provide an...
  • sylus authored 9c170d0 on 7.x-4.x
    Merge pull request #1883 from sylus/7.x-4.x
    
    Fixed WetKit Breadcrumbs...
natew’s picture

Thanks for the patch! I needed this in a recent upgrade from 1.x to 4.x that I was doing for a client. They are using a postgres db (not sure if this is related), but sometimes the titles don't show up, particularly in french, and if the breadcrumb trail is from the menu. I modified the code a bit to use menu_get_active_title if nothing is returned from drupal_get_title.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.