[% FOR facet_data IN facet.data;
display_value = facet_data.value | html;
param_string = fclass _ '|' _ fname _ '[' _ facet_data.value _ ']';
new_facets = [];
this_selected = 0;
FOR selected IN selected_facets;
IF selected == param_string;
this_selected = 1;
ELSE;
new_facets.push(selected);
END;
END;
display_count_by_cmf.$fid = display_count_by_cmf.$fid || 0;
NEXT UNLESS long_facets.grep(long_key).0 OR
display_count_by_cmf.$fid < DEFAULT_DISPLAY_COUNT;
# fix syntax highlighting: >
display_count_by_cmf.$fid = display_count_by_cmf.$fid + 1;
IF this_selected;
# This facet is already selected by the user.
# Link removes the facet from the set of selected facets.
%]
([% facet_data.count; IF facet_data.count == (ctx.superpage + 1) * ctx.superpage_size; '+'; END %])
[%
ELSE;
# This facet is not currently selected. If selected,
# append this facet to the list of currently active facets.
%]
[% END %]
[% END %]