views-ui-expose-filter-form.html.twig

Same filename in this branch
  1. 9 core/themes/stable9/templates/admin/views-ui-expose-filter-form.html.twig
  2. 9 core/themes/stable/templates/admin/views-ui-expose-filter-form.html.twig
  3. 9 core/modules/views_ui/templates/views-ui-expose-filter-form.html.twig
Same filename in other branches
  1. 8.9.x core/themes/stable/templates/admin/views-ui-expose-filter-form.html.twig
  2. 8.9.x core/modules/views_ui/templates/views-ui-expose-filter-form.html.twig
  3. 10 core/themes/stable9/templates/admin/views-ui-expose-filter-form.html.twig
  4. 10 core/themes/claro/templates/views/views-ui-expose-filter-form.html.twig
  5. 10 core/modules/views_ui/templates/views-ui-expose-filter-form.html.twig
  6. 11.x core/themes/stable9/templates/admin/views-ui-expose-filter-form.html.twig
  7. 11.x core/themes/claro/templates/views/views-ui-expose-filter-form.html.twig
  8. 11.x core/modules/views_ui/templates/views-ui-expose-filter-form.html.twig

Theme override 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/themes/claro/templates/views/views-ui-expose-filter-form.html.twig

View source
  1. {#
  2. /**
  3. * @file
  4. * Theme override 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.required }}
  25. {{ form.group_button }}
  26. {{ form.label }}
  27. {{ form.description }}
  28. {{ form.operator }}
  29. {{ form.value }}
  30. {% if form.use_operator %}
  31. <div class="views-config-group-region">
  32. <div class="views-group-box">
  33. {{ form.use_operator }}
  34. {{ form.operator_limit_selection }}
  35. {{ form.operator_list }}
  36. {{ form.operator_id }}
  37. </div>
  38. {% endif %}
  39. {#
  40. Collect a list of elements printed to exclude when printing the
  41. remaining elements.
  42. #}
  43. {% set remaining_form = form|without(
  44. 'form_description',
  45. 'expose_button',
  46. 'group_button',
  47. 'required',
  48. 'label',
  49. 'description',
  50. 'operator',
  51. 'value',
  52. 'use_operator',
  53. 'more',
  54. 'admin_label',
  55. 'operator_limit_selection',
  56. 'operator_list',
  57. 'operator_id'
  58. )
  59. %}
  60. {#
  61. Only output the right column markup if there's a left column to begin with.
  62. #}
  63. {% if form.operator['#type'] %}
  64. <div class="views-group-box">
  65. {{ remaining_form }}
  66. </div>
  67. {% else %}
  68. {{ remaining_form }}
  69. {% endif %}
  70. {% if form.use_operator %}
  71. </div>
  72. {% endif %}
  73. {{ form.admin_label }}
  74. {{ form.more }}

Related topics


Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.