You are here

block--exposed_filter_data.html.twig in Exposed Filter Data 8

{% if filters %}
<div class='exposed_filter_data'>
  <div class='title'>Filtered by:</div>
  <div class='content'>
    {% for key, value in filters %}
      {% if value %}
        <div class='filter'>
          <div class='name'>{{ key }}:</div>
          <div class='value'>{{ value }}</div>
       </div>
      {% endif %}
    {% endfor %}
  </div>
</div>
<div class='clear_filters_button'>
  {% set url = path('<current>') %}
  <form action="{{ url }}" method="post">
    <button type="submit">Clear Filters</button>
  </form>
</div>
{% endif %}

File

templates/block--exposed_filter_data.html.twig
View source
  1. {% if filters %}
  2. <div class='exposed_filter_data'>
  3. <div class='title'>Filtered by:</div>
  4. <div class='content'>
  5. {% for key, value in filters %}
  6. {% if value %}
  7. <div class='filter'>
  8. <div class='name'>{{ key }}:</div>
  9. <div class='value'>{{ value }}</div>
  10. </div>
  11. {% endif %}
  12. {% endfor %}
  13. </div>
  14. </div>
  15. <div class='clear_filters_button'>
  16. {% set url = path('<current>') %}
  17. <form action="{{ url }}" method="post">
  18. <button type="submit">Clear Filters</button>
  19. </form>
  20. </div>
  21. {% endif %}