views-view-row-rss.html.twig 677 B

123456789101112131415161718192021222324252627282930
  1. {#
  2. /**
  3. * @file
  4. * Theme override to display an item in a views RSS feed.
  5. *
  6. * Available variables:
  7. * - title: RSS item title.
  8. * - link: RSS item link.
  9. * - description: RSS body text.
  10. * - item_elements: RSS item elements to be rendered as XML (pubDate, creator,
  11. * guid).
  12. *
  13. * @see template_preprocess_views_view_row_rss()
  14. *
  15. * @ingroup themeable
  16. */
  17. #}
  18. <item>
  19. <title>{{ title }}</title>
  20. <link>{{ link }}</link>
  21. <description>{{ description }}</description>
  22. {% for item in item_elements -%}
  23. <{{ item.key }}{{ item.attributes -}}
  24. {% if item.value -%}
  25. >{{ item.value }}</{{ item.key }}>
  26. {% else -%}
  27. {{ ' />' }}
  28. {% endif %}
  29. {%- endfor %}
  30. </item>