Filter the apachesolr result to language neutral or active language only.
bug: the language filter is displayed in the breadcrumb, and there is no way in apachesolr-6.x-1.x to remove this filter form the breadcrumb..
workaround: add this code into _preprecess_page(&$vars)
if (arg(0) == 'search') {
// Remove language filters from breadcrumb. This could be removed when
// apachesolr-6.x-2.x will be used on the site.
$breadcrumb = drupal_get_breadcrumb();
$langcodes = array_keys(language_list());
foreach ($breadcrumb as $key => $link) {
if (strpos($link, '-language') || in_array($link, $langcodes)) {
unset($breadcrumb[$key]);
}
}
// The last breadcrumb is the current page, so it shouldn't be a link.
$last = count($breadcrumb) - 1;
$breadcrumb[$last] = strip_tags($breadcrumb[$last]);
$vars['breadcrumb'] = theme('breadcrumb', $breadcrumb);
}
| Release | Package | Date | |
|---|---|---|---|
| 6.x-1.x-dev-pasq | Download (645 bytes) | Release notes | Oct 9 2009 |