Same filename in this branch
  1. 10 core/modules/views_ui/templates/views-ui-expose-filter-form.html.twig
  2. 10 core/themes/claro/templates/views/views-ui-expose-filter-form.html.twig
  3. 10 core/themes/stable9/templates/admin/views-ui-expose-filter-form.html.twig
Same filename and directory in other branches
  1. 8.9.x core/modules/views_ui/templates/views-ui-expose-filter-form.html.twig
  2. 9 core/modules/views_ui/templates/views-ui-expose-filter-form.html.twig

Default theme implementation for exposed filter form.

Available variables:

  • form_description: The exposed filter's description.
  • expose_button: The button to toggle the expose filter form.
  • group_button: Toggle options between single and grouped filters.
  • required: A checkbox to require this filter or not.
  • label: A filter label input field.
  • description: A filter description field.
  • operator: The operators for how the filters value should be treated.
    • #type: The operator type.
  • value: The filters available values.
  • use_operator: Checkbox to allow the user to expose the operator.
  • more: A details element for additional field exposed filter fields.

File

core/modules/views_ui/templates/views-ui-expose-filter-form.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation for exposed filter form.
  5. *
  6. * Available variables:
  7. * - form_description: The exposed filter's description.
  8. * - expose_button: The button to toggle the expose filter form.
  9. * - group_button: Toggle options between single and grouped filters.
  10. * - required: A checkbox to require this filter or not.
  11. * - label: A filter label input field.
  12. * - description: A filter description field.
  13. * - operator: The operators for how the filters value should be treated.
  14. * - #type: The operator type.
  15. * - value: The filters available values.
  16. * - use_operator: Checkbox to allow the user to expose the operator.
  17. * - more: A details element for additional field exposed filter fields.
  18. *
  19. * @ingroup themeable
  20. */
  21. #}
  22. {{ form.form_description }}
  23. {{ form.expose_button }}
  24. {{ form.group_button }}
  25. {{ form.required }}
  26. {{ form.label }}
  27. {{ form.description }}
  28. {{ form.operator }}
  29. {{ form.value }}
  30. {% if form.use_operator %}
  31. <div class="views-left-40">
  32. {{ form.use_operator }}
  33. </div>
  34. {% endif %}
  35. {#
  36. Collect a list of elements printed to exclude when printing the
  37. remaining elements.
  38. #}
  39. {% set remaining_form = form|without(
  40. 'form_description',
  41. 'expose_button',
  42. 'group_button',
  43. 'required',
  44. 'label',
  45. 'description',
  46. 'operator',
  47. 'value',
  48. 'use_operator',
  49. 'more'
  50. )
  51. %}
  52. {#
  53. Only output the right column markup if there's a left column to begin with.
  54. #}
  55. {% if form.operator['#type'] %}
  56. <div class="views-right-60">
  57. {{ remaining_form }}
  58. </div>
  59. {% else %}
  60. {{ remaining_form }}
  61. {% endif %}
  62. {{ form.more }}

Related topics