You are here

block--search-form-block.html.twig in Drupal 10

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.

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