@@ -, +, @@ --- C4/Search.pm | 7 +++++++ 1 file changed, 7 insertions(+) --- a/C4/Search.pm +++ a/C4/Search.pm @@ -586,6 +586,13 @@ sub getRecords { my $av = Koha::AuthorisedValues->search({ category => 'LOC', authorised_value => $one_facet }); $facet_label_value = $av->count ? $av->next->opac_description : ''; } + + # also, if it's a collection code, use the name instead of the code + if ( $link_value =~ /ccode/ ) { + # TODO Retrieve all authorised values at once, instead of 1 query per entry + my $av = Koha::AuthorisedValues->search({ category => 'CCODE', authorised_value => $one_facet }); + $facet_label_value = $av->count ? $av->next->opac_description : ''; + } # but we're down with the whole label being in the link's title. push @this_facets_array, --