For search results, crumbs is outputting this:

Home • Search • Content • Content

What I would prefer is that it output just
Home • Search
or
Home • Search • Results for [search term here]

Any suggestions?

Comments

tarheeldev’s picture

I fixed this using CSS

donquixote’s picture

Ok, I definitely think this should be implemented in Crumbs by default.

Binu Varghese’s picture

Breadcrumb Trail (search page):
=======================
Home • Search • Content • Content

Make these highlighted changes in your active theme's template.php

function THEMENAME_breadcrumb($variables) {
$breadcrumb = $variables['breadcrumb'];
if (!empty($breadcrumb)) {
-- -- --
-- -- --
if(arg(0)=='search')
{
unset($breadcrumb[2]);
unset($breadcrumb[3]);
}

$output .= '' . implode(' » ', $breadcrumb) . '';
return $output;
}
}

Result:
=======
Home • Search

Hope it helps!

Binu Varghese’s picture

Status: Active » Fixed

Check out an another scenario: https://drupal.org/node/2163373 posted today!

donquixote’s picture

Status: Fixed » Active

Nooooo!
@Binu:
1. This is not fixed.
2. If you already implement a solution in code, you should rather write a plugin than a theme hack. Ideally one that you can share with us...

Binu Varghese’s picture

oops! wrong status.. i meant to provide a solution on the code front only!

donquixote’s picture

Status: Active » Needs review

Here is an attempt to implement this in Crumbs natively:
https://github.com/donquixote/drupal-crumbs/compare/7.x-2.x-search?expand=1

Don't you agree the API is awesome :)

So far this fix will only do the following change:

On search/node/%: Home » Search (» Content)
On search/user/%: Home » Search (» Users)

However: There are so many ways that people could want this to look like, that in the end maybe custom plugins are the better option?
Maybe we just commit this simply "fix" and then people who are not happy should do their own plugin?

donquixote’s picture

Status: Needs review » Fixed

Implemented in 7.x-2.0-beta12.

If you want something more fancy, have a look at my stackexchange answer:
http://drupal.stackexchange.com/a/98432/2974

Status: Fixed » Closed (fixed)

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