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

Open in your IDE?
  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.                             {# @deprecated tag:v6.5.0 - Bootstrap v5 removes `input-group-append` wrapper and uses elements as direct children of `input-group` #}
  29.                             {% if feature('v6.5.0.0') %}
  30.                                 <button type="submit"
  31.                                         class="btn header-search-btn"
  32.                                         aria-label="{{ "header.searchButton"|trans|striptags }}">
  33.                                     <span class="header-search-icon">
  34.                                         {% sw_icon 'search' %}
  35.                                     </span>
  36.                                 </button>
  37.                             {% else %}
  38.                                 <div class="input-group-append">
  39.                                     <button type="submit"
  40.                                             class="btn header-search-btn"
  41.                                             aria-label="{{ "header.searchButton"|trans|striptags }}">
  42.                                         <span class="header-search-icon">
  43.                                             {% sw_icon 'search' %}
  44.                                         </span>
  45.                                     </button>
  46.                                 </div>
  47.                             {% endif %}
  48.                         {% endblock %}
  49.                     </div>
  50.                 {% endblock %}
  51.             </form>
  52.         </div>
  53.     </div>
  54. {% endblock %}