Hi there,

Great module, thank you for your contribution!

i am finding that when i include a views search query link it doesn't encode properly to a clean url.

For example:

original link in breadcrumb path

service-provider?field_profile_address_administrative_area_1=All&field_geofield_distance%5Borigin%5D=&field_geofield_distance%5Bunit%5D=6371&field_geofield_distance%5Bdistance%5D=1&field_profile_description_value=&combine=&type_3%5B1%5D=1&sort_bef_combine=field_business_name_value+DESC

this gets converted to:

service-provider%3Ffield_profile_address_administrative_area_1%3DAll%3D%26field_geofield_distance%3D6371%26field_geofield_distance%3D1%26field_profile_description_value%3D%26combine%3D%26type_3%3D1%26sort_bef_combine%3Dfield_business_name_value%2BDESC

Any idea how to fix this? :) I would like to have a auto search in the breadcrumbs :)

Comments

capfive’s picture

any one have any idea on this? would be AWESOME to have a search query as the breadcrumb to improve usability

csunny’s picture

I also need this. But I think it's not possible with current modules since it doesn't provide a way to pass 'query' as paramater to link generation functions.
Consider other workaround, for example hook_menu_breadcrumb_alter.

csunny’s picture

This is what you may need:

/**
 * Implements hook_menu_breadcrumb_alter.
 * Need to pass query as parameters to link function.
 * @param $active_trail
 * @param $item
 */
function hook_menu_breadcrumb_alter(&$active_trail, $item) {
  foreach($active_trail as &$trail) {
    $url = drupal_parse_url($trail['href']);
    if (count($url['query'])) {
      $trail['href'] = $url['path'];
      $trail['localized_options'] += array('query' => $url['query']);
    }
  }
}
capfive’s picture

Wow thanks that looks like it should do the trick! I will test this and let you know how I go!

IreneV’s picture

IreneV’s picture

Status: Active » Fixed
Issue tags: +epam-contrib-2019.03

Fixed
Will be included in next release

pifagor’s picture

Unfortunately, I do not see the patch commit. Is this issue really patched?

ram4nd’s picture

Issue tags: -epam-contrib-2019.03

Status: Fixed » Closed (fixed)

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