If you have some search with for example one facet for the node: type and filter by that
you end up in a breadcrumb like that:

Frontpage › Search › [All Items] › Article

This string is coming from SearchApiFacetapiAdapter::getSearchKeys()

For me it seems to make sense to not include [All Items] in the breadcrumb as it looks somehow broken.

One problem though is that Article is not linked.

<div class="breadcrumb"><a href="/">Frontpage</a> › <a href="/search">Search</a> › <a href="/search/type/article" class="active">[all items]</a> › Article </div>
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dasjo’s picture

yep, confirmed - i was seeing this as well. i didn't care about breadcrumbs too much, actually this functionality was contributed in #1514980: Support for breadcrumb.

anyways, i'd be happy to improve that behavior, we should also check if the same problem exists for search_api / apachesolr without facetapi_pretty_paths.

dasjo’s picture

Status: Active » Postponed (maintainer needs more info)

please compare with existing behavior of facet api with search_api and apachesolr

ZoeN’s picture

Version: 7.x-1.x-dev » 7.x-1.0
Status: Postponed (maintainer needs more info) » Active

Same thing here - breadcrumb without FacetAPI Pretty Paths is just Home -> Search; with Pretty Paths enabled, an [All items] crumb is added. Happens at the end of public function setBreadcrumb() in FacetapiUrlProcessorPrettyPaths.

As a first step, can we make the breadcrumbs functionality of FacetAPI Pretty Paths optional? I'm doing my own custom breadcrumbs anyway.

dasjo’s picture

thanks for clarification that the issue seems to be caused by the module itself.

i'm uncertain if making it optional is the right way to go, but feel free to provide a patch

heshanlk’s picture

Status: Active » Needs review
FileSize
1.77 KB

This module functionality can be extended vary easily. In this case we might need to create a new url processor using hook_facetapi_url_processors. But I patched the module to add this functionality and make [All Items] bread crumb trail options. Patch is attached.

dasjo’s picture

i'm wondering if this is still the case.
just tried a plain Recruiter distro install, switched to the bartik theme and couldn't find the [all] breadcrumb any more.
see attached screenshot.

regarding the provided patch: thanks! i'm just wondering if we have use cases where we need [all] (at all...)?