aggregator-feed.html.twig

Same filename in this branch
  1. 8.9.x core/profiles/demo_umami/themes/umami/templates/classy/dataset/aggregator-feed.html.twig
  2. 8.9.x core/themes/seven/templates/classy/dataset/aggregator-feed.html.twig
  3. 8.9.x core/themes/claro/templates/classy/dataset/aggregator-feed.html.twig
  4. 8.9.x core/themes/stable/templates/dataset/aggregator-feed.html.twig
  5. 8.9.x core/themes/classy/templates/dataset/aggregator-feed.html.twig
  6. 8.9.x core/modules/aggregator/templates/aggregator-feed.html.twig
Same filename in other branches
  1. 9 core/profiles/demo_umami/themes/umami/templates/classy/dataset/aggregator-feed.html.twig
  2. 9 core/themes/stable9/templates/dataset/aggregator-feed.html.twig
  3. 9 core/themes/seven/templates/classy/dataset/aggregator-feed.html.twig
  4. 9 core/themes/claro/templates/classy/dataset/aggregator-feed.html.twig
  5. 9 core/themes/bartik/templates/classy/dataset/aggregator-feed.html.twig
  6. 9 core/themes/stable/templates/dataset/aggregator-feed.html.twig
  7. 9 core/themes/classy/templates/dataset/aggregator-feed.html.twig
  8. 9 core/modules/aggregator/templates/aggregator-feed.html.twig

Theme override 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.
  • attributes: HTML attributes for the wrapper.
  • 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.

See also

template_preprocess_aggregator_feed()

File

core/themes/bartik/templates/classy/dataset/aggregator-feed.html.twig

View source
  1. {#
  2. /**
  3. * @file
  4. * Theme override 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. * - attributes: HTML attributes for the wrapper.
  16. * - title_attributes: Same as attributes, except applied to the main title
  17. * tag that appears in the template.
  18. * - title_prefix: Additional output populated by modules, intended to be
  19. * displayed in front of the main title tag that appears in the template.
  20. * - title_suffix: Additional output populated by modules, intended to be
  21. * displayed after the main title tag that appears in the template.
  22. *
  23. * @see template_preprocess_aggregator_feed()
  24. */
  25. #}
  26. <div{{ attributes.addClass('aggregator-feed') }}>
  27. {{ title_prefix }}
  28. {% if title and not full %}
  29. <h2{{ title_attributes }}>{{ title }}</h2>
  30. {% endif %}
  31. {{ title_suffix }}
  32. {{ content }}
  33. </div>

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