The problem is that my current facets loop, only shows facets that have values. That's fine as long as there is 1 or +1 results. But not what I want when there is no result, because I want the user to get the option of selecting all options/facets (eg. all "empty" facets) - while their current selections are still "active" in the filter.
My loop dows not include empty facets, but maybe someone has a suggestion on how I can get "empty" facets included?
my code looks like this.
@foreach (LoopItem facet group in GetLoop ( "Facet Group"))
{
foreach (LoopItem facet in facetGroup.GetLoop ( "Facets"))
{
<Div class = "col-md-3">
<Label for = "district"> @ facet.GetString ( "Facet.Name") </ label>
<Select multiple class = "e1" name = "@ facet.GetString (" Facet.QueryParameter ")" ID = "@ facet.GetString (" Facet.QueryParameter ")" style = "width: 100%;">
@foreach (LoopItem option in facet.GetLoop ( "Facet Options"))
{
was option.GetValue value = ( "FacetOption.Value");
was selected option.GetBoolean = ( "FacetOption.Selected");
was option.GetString label = ( "FacetOption.Label");
was count = option.GetInteger ( "FacetOption.Count");
<Option value = "@ value" selected = "@ selected">
@label (@count)
</ Option>
}
</ Select>
</ Div>
}
}