Per modificare la parte html di una exposed filter bisogna creare il file
views-exposed-form--[VIEW NAME]--[PAGE machine name].html.twig
nel proprio tema e riportare la struttura originale
{#
/**
* @file
* Theme override of a views exposed form.
*
* Available variables:
* - form: A render element representing the form.
*
* @see template_preprocess_views_exposed_form()
*/
#}
{% if q is not empty %}
{#
This ensures that, if clean URLs are off, the 'q' is added first,
as a hidden form element, so that it shows up first in the POST URL.
#}
{{ q }}
{% endif %}
{{ form }}
Da qui รจ possibile modificare e gestire i campi come nell'esempio che riporto qui sotto.
{#
/**
* @file
* Theme override of a views exposed form.
*
* Available variables:
* - form: A render element representing the form.
*
* @see template_preprocess_views_exposed_form()
*/
#}
<h1 class="block-title text-center">FILTER BY</h1>
{% if q is not empty %}
{#
This ensures that, if clean URLs are off, the 'q' is added first,
as a hidden form element, so that it shows up first in the POST URL.
#}
{{ q }}
{% endif %}
{# {{ form }} #}
<div class="row">
<div class="col-md-3">
{{ form.field_type_resource_target_id }}
</div>
<div class="col-md-9">
{{ form.field_tag_resource_target_id }}
</div>
</div>
{{ form|without('field_type_resource_target_id', 'field_tag_resource_target_id') }}
Expose Filter (85)