simplepodcast-8.x-1.x-dev/templates/simplepodcast-xml.html.twig
templates/simplepodcast-xml.html.twig
{#
/**
* @file
* Default template for SimplePodcast XMl feed
*
* Available variables:
* - channel_title: The link to the feed (the view path).
*
*/
#}
<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
<channel>
<title>{{ channel_title|e }}</title>
<link>{{ channel_link }}</link>
<description>{{ channel_description }}</description>
<language>{{ channel_lang|default('en_us') }}</language>
<copyright>©{{ channel_copyright }}</copyright>
<atom:link href="{{ channel_rss_url }}" rel="self" type="application/rss+xml" />
<itunes:explicit>{{ channel_explicit }}</itunes:explicit>
<itunes:author>{{ channel_owner_author }}</itunes:author>
<itunes:owner>
<itunes:name>{{ channel_owner_name }}</itunes:name>
<itunes:email>{{ channel_owner_email }}</itunes:email>
</itunes:owner>
<itunes:image href="{{ channel_image_url }}" />
{% for category in channel_categories %}
{% if category.sub %}
<itunes:category text="{{ category.main|raw }}">
<itunes:category text="{{ category.sub|raw }}" />
</itunes:category>
{% else %}
<itunes:category text="{{ category.main|raw }}" />
{% endif %}
{% endfor %}
{% for item in items %}
<item>
<title>{{ item.item_title|e }}</title>
<itunes:author>{{ item.item_author }}</itunes:author>
<itunes:subtitle>{{ item.item_subtitle|e }}</itunes:subtitle>
<itunes:summary><![CDATA[{{ item.item_summary }}]]></itunes:summary>
{% if item.item_image_url %}
<itunes:image href="{{ item.item_image_url }}" />
{% endif %}
<itunes:duration>{{ item.item_duration }}</itunes:duration>
<enclosure url="{{ item.item_media_url }}" length="{{ item.item_media_length }}" type="{{ item.item_media_type|default('audio/mpeg')}}" />
<guid>{{ item.item_guid }}</guid>
<pubDate>{{ item.item_pubdate }}</pubDate>
</item>
{% endfor %}
</channel>
</rss>