src/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.                   data-search-form="true"
  11.                   data-search-widget-options='{{ searchWidgetOptions|json_encode }}'
  12.                   data-url="{{ path('frontend.search.suggest') }}?search="
  13.                   class="header-search-form">
  14.                 {% block layout_header_search_input_group %}
  15.                     <div class="input-group">
  16.                         {% block layout_header_search_input %}
  17.                             <input type="search"
  18.                                    name="search"
  19.                                    class="form-control header-search-input"
  20.                                    autocomplete="off"
  21.                                    autocapitalize="off"
  22.                                    placeholder="{{ "header.searchPlaceholder"|trans|striptags }}"
  23.                                    aria-label="{{ "header.searchPlaceholder"|trans|striptags }}"
  24.                                    value="{{ page.searchTerm }}"
  25.                             >
  26.                         {% endblock %}
  27.                         {% block layout_header_search_button %}
  28.                             <button type="submit"
  29.                                     class="btn header-search-btn"
  30.                                     aria-label="{{ "header.searchButton"|trans|striptags }}">
  31.                                 <span class="header-search-icon">
  32.                                     {% sw_icon 'search' %}
  33.                                 </span>
  34.                             </button>
  35.                         {% endblock %}
  36.                     </div>
  37.                 {% endblock %}
  38.             </form>
  39.         </div>
  40.     </div>
  41. {% endblock %}