$def with (param, search_response, q_param, path=None, query={}) $code: fulltext_names = {'true': 'Ebooks', 'false': 'Exclude ebooks'} facet_map = get_facet_map() def del_facet_url(k, v): if k != 'has_fulltext': return changequery(page=None, _path=path, query=dict(query), **{k:[i for i in param.get(k, []) if i != v]}) else: return changequery(page=None, _path=path, query=dict(query), **{k:None}) $if param and not search_response.error: $ title = [] $if q_param: $title.append(q_param) $if 'has_fulltext' in param: $title.append(_('eBook')) $if 'public_scan_b' in param: $title.append(_('Classic eBook')) $if any(header in param for header, label in facet_map):

$_('Search facets') $for header, label in facet_map: $ counts = search_response.facet_counts[header] $for k, display, count in counts: $if k not in param.get(header, []): $continue $if header not in ['has_fulltext', 'public_scan_b']: $title.append(display) $if header == 'has_fulltext': $fulltext_names.get(k, '') $elif header == 'public_scan_b': $if display == 'true': $_("Only Classic eBooks") $else: Classic eBooks hidden $elif header == 'subject_facet': $display $elif header == 'person_facet': $display $elif header == 'place_facet': $display $elif header == 'time_facet': $display $elif header == 'first_publish_year': $display $elif header == 'language': $display $elif header == 'publisher_facet': $display $elif header == 'author_key': $display [x]

$var title: $_('%(title)s - search', title=', '.join(title))