ninefolio/templates/Home/feed.xml.twig

37 lines
1.4 KiB
Twig
Executable File

{% autoescape %}
{% set sessionconfigs = app.session.get('configs') %}
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title>{{ app.session.get('appname') }}</title>
<link>{{ absolute_url(path("app_home")) }}</link>
<description>{{ app.session.get('appname') }} - {{app.session.get('appsubname') }}</description>
{% for feed in feeds %}
{% set url = absolute_url(path(feed.path,{"by":by, "idcat":feed.idcat,"id":feed.id}))|replace({'http://': protocole~'://'}) %}
<item>
<guid><![CDATA[{{url}}]]></guid>
<title>{{ app.session.get('appname') }} - {{feed.name}}</title>
<author>{{ app.session.get('appname') }}</author>
<categories>{{ feed.cat }}</categories>
<pubDate>{{feed.pubtime|date('D, d M Y H:i:s O')}}</pubDate>
<link><![CDATA[{{url}}]]></link>
<description><![CDATA[
<a href="{{ url }}"><img src='{{ protocole~"://"~appWeburl~"/"~appAlias~"/uploads/"~feed.type~"/thumbori_"~feed.illustration }}'></p>
<h3>{{feed.name}}</h3>
{% autoescape 'html' %}
<div class="desc">
{{feed.description|raw }}
</div>
{% endautoescape %}
]]></description>
<enclosure url="{{ protocole~"://"~appWeburl~"/"~appAlias~"/uploads/"~feed.type~"/thumbori_"~feed.illustration }}" rel="thumb" />
<enclosure url="{{ protocole~"://"~appWeburl~"/"~appAlias~"/uploads/"~feed.type~"/"~feed.illustration }}" rel="big" />
</item>
{% endfor %}
</channel>
</rss>
{% endautoescape %}