vendor/shopware/storefront/Resources/views/storefront/layout/header/search.html.twig line 1

  1. {% set searchWidgetOptions = {
  2.     searchWidgetMinChars: page.header.activeLanguage.productSearchConfig.minSearchLength ?: 3
  3. } %}
  4. {% block layout_header_search %}
  5.     <div class="collapse"
  6.          id="searchCollapse">
  7.         <div class="header-search">
  8.             <form action="{{ path('frontend.search.page') }}"
  9.                   method="get"
  10.                   {# @deprecated tag:v6.6.0 - Registering plugin on selector "data-search-form" is deprecated. Use "data-search-widget" instead #}
  11.                   {% if feature('v6.6.0.0') %}
  12.                       data-search-widget="true"
  13.                   {% else %}
  14.                       data-search-form="true"
  15.                   {% endif %}
  16.                   data-search-widget-options='{{ searchWidgetOptions|json_encode }}'
  17.                   data-url="{{ path('frontend.search.suggest') }}?search="
  18.                   class="header-search-form">
  19.                 {% block layout_header_search_input_group %}
  20.                     <div class="input-group">
  21.                         {% block layout_header_search_input %}
  22.                             <input type="search"
  23.                                    name="search"
  24.                                    class="form-control header-search-input"
  25.                                    autocomplete="off"
  26.                                    autocapitalize="off"
  27.                                    placeholder="{{ "header.searchPlaceholder"|trans|striptags }}"
  28.                                    aria-label="{{ "header.searchPlaceholder"|trans|striptags }}"
  29.                                    value="{{ page.searchTerm }}"
  30.                             >
  31.                         {% endblock %}
  32.                         {% block layout_header_search_button %}
  33.                             <button type="submit"
  34.                                     class="btn header-search-btn"
  35.                                     aria-label="{{ "header.searchButton"|trans|striptags }}">
  36.                                 <span class="header-search-icon">
  37.                                     {% sw_icon 'search' %}
  38.                                 </span>
  39.                             </button>
  40.                         {% endblock %}
  41.                     </div>
  42.                 {% endblock %}
  43.             </form>
  44.         </div>
  45.     </div>
  46. {% endblock %}