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

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

Olivero's theme implementation for a search form block.

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

Related topics


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