item-list--search-results.html.twig 923 B

1234567891011121314151617181920212223242526272829
  1. {% extends "item-list.html.twig" %}
  2. {#
  3. /**
  4. * @file
  5. * Theme override for an item list of search results.
  6. *
  7. * Available variables:
  8. * - items: A list of items. Each item contains:
  9. * - attributes: HTML attributes to be applied to each list item.
  10. * - value: The content of the list element.
  11. * - title: The title of the list.
  12. * - list_type: The tag for list element ("ul" or "ol").
  13. * - attributes: HTML attributes to be applied to the list.
  14. * - empty: A message to display when there are no items. Allowed value is a
  15. * string or render array.
  16. * - context: An list of contextual data associated with the list. For search
  17. * results, the following data is set:
  18. * - plugin: The search plugin ID, for example "node_search".
  19. *
  20. * @see template_preprocess_item_list()
  21. */
  22. #}
  23. {%
  24. set classes = [
  25. 'search-results',
  26. context.plugin ~ '-results',
  27. ]
  28. %}
  29. {% set attributes = attributes.addClass(classes) %}