You are here:  » Add extra Filters in breadcrumbs


Add extra Filters in breadcrumbs

Submitted by marco.saiu on Sun, 2018-02-18 12:29 in

Hello David,

have idea how to add extra filters in breadcrumbs?

Extra filters are added in PT with your how to.

Thanks,
Marco Saiu

Submitted by support on Mon, 2018-02-19 09:34

Hello Marco,

To add filtername:filtervalue breadcrumbs for all filters in effect (linked to all results for that filter value), edit search.php and look for the following code at line 519:

    $banner["breadcrumbs"][] = array("title"=>$lastBreadcrumb." ".$showing,"href"=>"#");

...and REPLACE with:

    if (isset($_GET))
    {
      foreach($_GET as $k => $v)
      {
        if ($v)
        {
          $p = strpos($k,"Filter");
          if ($p!==FALSE)
          {
            $filter = substr($k,0,$p);
            $href = $config_baseHREF."search.php?q=bw:&".$filter."Filter=".urlencode($v);
            $banner["breadcrumbs"][] = array("title"=>$filter.":".$v,"href"=>$href);
          }
        }
      }
    }
    $banner["breadcrumbs"][] = array("title"=>$lastBreadcrumb." ".$showing,"href"=>"#");

Cheers,
David.
--
PriceTapestry.com