You are here

aggregator-feed.html.twig in Drupal 9

Default theme implementation to present an aggregator feed.

The contents are rendered above feed listings when browsing source feeds. For example, "example.com/aggregator/sources/1".

Available variables:

  • title: (optional) Title of the feed item.
  • content: All field items. Use {{ content }} to print them all, or print a subset such as {{ content.field_example }}. Use {{ content|without('field_example') }} to temporarily suppress the printing of a given element.
  • title_attributes: Same as attributes, except applied to the main title tag that appears in the template.
  • title_prefix: Additional output populated by modules, intended to be displayed in front of the main title tag that appears in the template.
  • title_suffix: Additional output populated by modules, intended to be displayed after the main title tag that appears in the template.

File

core/modules/aggregator/templates/aggregator-feed.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation to present an aggregator feed.
  5. *
  6. * The contents are rendered above feed listings when browsing source feeds.
  7. * For example, "example.com/aggregator/sources/1".
  8. *
  9. * Available variables:
  10. * - title: (optional) Title of the feed item.
  11. * - content: All field items. Use {{ content }} to print them all,
  12. * or print a subset such as {{ content.field_example }}. Use
  13. * {{ content|without('field_example') }} to temporarily suppress the printing
  14. * of a given element.
  15. * - title_attributes: Same as attributes, except applied to the main title
  16. * tag that appears in the template.
  17. * - title_prefix: Additional output populated by modules, intended to be
  18. * displayed in front of the main title tag that appears in the template.
  19. * - title_suffix: Additional output populated by modules, intended to be
  20. * displayed after the main title tag that appears in the template.
  21. *
  22. * @see template_preprocess_aggregator_feed()
  23. *
  24. * @ingroup themeable
  25. */
  26. #}
  27. {{ title_prefix }}
  28. {% if title and not full %}
  29. <h2{{ title_attributes }}>{{ title }}</h2>
  30. {% endif %}
  31. {{ title_suffix }}
  32. {{ content }}

Related topics