block--search-form-block.html.twig

Same filename in this branch
  1. 9 core/profiles/demo_umami/themes/umami/templates/components/search/block--search-form-block.html.twig
  2. 9 core/themes/seven/templates/classy/block/block--search-form-block.html.twig
  3. 9 core/themes/claro/templates/classy/block/block--search-form-block.html.twig
  4. 9 core/themes/bartik/templates/block--search-form-block.html.twig
  5. 9 core/themes/starterkit_theme/templates/block/block--search-form-block.html.twig
  6. 9 core/themes/classy/templates/block/block--search-form-block.html.twig
Same filename in other branches
  1. 8.9.x core/profiles/demo_umami/themes/umami/templates/components/search/block--search-form-block.html.twig
  2. 8.9.x core/themes/seven/templates/classy/block/block--search-form-block.html.twig
  3. 8.9.x core/themes/claro/templates/classy/block/block--search-form-block.html.twig
  4. 8.9.x core/themes/bartik/templates/block--search-form-block.html.twig
  5. 8.9.x core/themes/classy/templates/block/block--search-form-block.html.twig
  6. 10 core/profiles/demo_umami/themes/umami/templates/components/search/block--search-form-block.html.twig
  7. 10 core/themes/olivero/templates/block/block--search-form-block.html.twig
  8. 10 core/themes/claro/templates/classy/block/block--search-form-block.html.twig
  9. 10 core/themes/starterkit_theme/templates/block/block--search-form-block.html.twig
  10. 11.x core/profiles/demo_umami/themes/umami/templates/components/search/block--search-form-block.html.twig
  11. 11.x core/themes/olivero/templates/block/block--search-form-block.html.twig
  12. 11.x core/themes/claro/templates/classy/block/block--search-form-block.html.twig
  13. 11.x core/themes/starterkit_theme/templates/block/block--search-form-block.html.twig

Olivero's theme implementation for a search form block. Based on Classy's search form block template.

Available variables:

  • content: The content of this block.
  • content_attributes: A list of HTML attributes applied to the main content tag that appears in the template.

See also

template_preprocess_block()

search_preprocess_block()

File

core/themes/olivero/templates/block/block--search-form-block.html.twig

View source
  1. {#
  2. /**
  3. * @file
  4. * Olivero's theme implementation for a search form block. Based on Classy's
  5. * search form block template.
  6. *
  7. * Available variables:
  8. * - content: The content of this block.
  9. * - content_attributes: A list of HTML attributes applied to the main content
  10. * tag that appears in the template.
  11. *
  12. * @see template_preprocess_block()
  13. * @see search_preprocess_block()
  14. *
  15. * @ingroup themeable
  16. */
  17. #}
  18. {%
  19. set classes = [
  20. 'block',
  21. 'block-search',
  22. ]
  23. %}
  24. <div{{ attributes.addClass(classes) }}>
  25. {{ title_prefix }}
  26. {% if label %}
  27. <h2{{ title_attributes }}>{{ label }}</h2>
  28. {% endif %}
  29. {{ title_suffix }}
  30. {% block content %}
  31. <div{{ content_attributes.addClass('content', 'container-inline') }}>
  32. {{ content }}
  33. </div>
  34. {% endblock %}
  35. </div>

Related topics


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