Skip to content

Commit

Permalink
Do not render empty facets
Browse files Browse the repository at this point in the history
  • Loading branch information
joecorall authored Oct 24, 2023
1 parent 4349091 commit 3beec9d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions templates/block--facets.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
set classes = classes | merge(['facet-inactive'])
%}
{% endif %}
{% if content[0]['#items'] is defined %}
<div class="accordion-item">
<h2 class="accordion-header m-0 p-0">
<button class="accordion-button{{ expanded ? '' : ' collapsed' }}" type="button" data-bs-toggle="collapse" data-bs-target="#{{ plugin_id | clean_class }}" aria-expanded="{{ expanded ? "true" : "false" }}" aria-controls="{{ plugin_id | clean_class }}">
Expand All @@ -59,3 +60,5 @@
</div>
</div>
</div>
{% endif %}

0 comments on commit 3beec9d

Please sign in to comment.