LP# 1092946: TPAC search returned no results after selecting two facets user/dpearl/facetfix
authorDan Pearl <dpearl@cwmars.org>
Fri, 21 Dec 2012 21:16:59 +0000 (16:16 -0500)
committerDan Pearl <dpearl@cwmars.org>
Fri, 21 Dec 2012 21:20:44 +0000 (16:20 -0500)
Facets are one of those parameters that can appear more than once in the URL, so
it needed to be handled like an array.

Signed-off-by: Dan Pearl <dpearl@cwmars.org>
Open-ILS/src/templates/opac/results.tt2

index e5612cc..f45886f 100644 (file)
@@ -18,8 +18,8 @@
     PROCESS get_library;
 %]
     <form action="[% ctx.opac_root %]/results" method="GET">
-    [% IF CGI.param('facet') %]
-    <input type="hidden" name="facet" value="[% CGI.param('facet') %]" />
+    [% FOREACH res_facet IN CGI.param('facet') %] 
+       <input type="hidden" name="facet" value="[% res_facet %]" />
     [% END %]
     <div id="search-wrapper">
         [% INCLUDE "opac/parts/searchbar.tt2" took_care_of_form=1 %]