views-view-rss.html.twig

Same filename in this branch
  1. 10 core/modules/views/templates/views-view-rss.html.twig
Same filename in other branches
  1. 9 core/themes/stable9/templates/views/views-view-rss.html.twig
  2. 9 core/themes/stable/templates/views/views-view-rss.html.twig
  3. 9 core/themes/classy/templates/views/views-view-rss.html.twig
  4. 9 core/modules/views/templates/views-view-rss.html.twig
  5. 8.9.x core/themes/stable/templates/views/views-view-rss.html.twig
  6. 8.9.x core/themes/classy/templates/views/views-view-rss.html.twig
  7. 8.9.x core/modules/views/templates/views-view-rss.html.twig
  8. 11.x core/themes/stable9/templates/views/views-view-rss.html.twig
  9. 11.x core/modules/views/templates/views-view-rss.html.twig

Theme override for feed displays that use the RSS style.

Available variables:

  • link: The link to the feed (the view path).
  • namespaces: The XML namespaces (added automatically).
  • title: The title of the feed (as set in the view).
  • description: The feed description (from feed settings).
  • langcode: The language encoding.
  • channel_elements: The formatted channel elements.
  • items: The feed items themselves.

See also

template_preprocess_views_view_rss()

File

core/themes/stable9/templates/views/views-view-rss.html.twig

View source
  1. {#
  2. /**
  3. * @file
  4. * Theme override for feed displays that use the RSS style.
  5. *
  6. * Available variables:
  7. * - link: The link to the feed (the view path).
  8. * - namespaces: The XML namespaces (added automatically).
  9. * - title: The title of the feed (as set in the view).
  10. * - description: The feed description (from feed settings).
  11. * - langcode: The language encoding.
  12. * - channel_elements: The formatted channel elements.
  13. * - items: The feed items themselves.
  14. *
  15. * @see template_preprocess_views_view_rss()
  16. */
  17. #}
  18. <?xml version="1.0" encoding="utf-8"?>
  19. <rss version="2.0" xml:base="{{ link }}"{{ namespaces }}>
  20. <channel>
  21. <title>{{ title }}</title>
  22. <link>{{ link }}</link>
  23. <description>{{ description }}</description>
  24. <language>{{ langcode }}</language>
  25. {{ channel_elements }}
  26. {{ items }}
  27. </channel>
  28. </rss>

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