aggregator-item.html.twig

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

Theme override to present a feed item in an aggregator page.

Available variables:

  • url: URL to the originating feed item.
  • 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_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_item()

File

core/themes/seven/templates/classy/content/aggregator-item.html.twig

View source
  1. {#
  2. /**
  3. * @file
  4. * Theme override to present a feed item in an aggregator page.
  5. *
  6. * Available variables:
  7. * - url: URL to the originating feed item.
  8. * - title: (optional) Title of the feed item.
  9. * - content: All field items. Use {{ content }} to print them all,
  10. * or print a subset such as {{ content.field_example }}. Use
  11. * {{ content|without('field_example') }} to temporarily suppress the printing
  12. * of a given element.
  13. * - attributes: HTML attributes for the wrapper.
  14. * - title_prefix: Additional output populated by modules, intended to be
  15. * displayed in front of the main title tag that appears in the template.
  16. * - title_suffix: Additional output populated by modules, intended to be
  17. * displayed after the main title tag that appears in the template.
  18. *
  19. * @see template_preprocess_aggregator_item()
  20. */
  21. #}
  22. <article{{ attributes.addClass('aggregator-item') }}>
  23. {{ title_prefix }}
  24. {% if title %}
  25. <h3 class="feed-item-title">
  26. <a href="{{ url }}">{{ title }}</a>
  27. </h3>
  28. {% endif %}
  29. {{ title_suffix }}
  30. {{ content }}
  31. </article>

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