ninefolio/templates/Home/feed.xml.twig

37 lines
1.4 KiB
Twig
Raw Normal View History

2024-09-17 14:02:17 +02:00
{% 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 %}
2024-11-03 16:28:20 +01:00
{% set url = absolute_url(path(feed.path,{"by":by,"idcat":feed.idcat,"id":feed.id}))|replace({'http://': protocole~'://'}) %}
2024-09-17 14:02:17 +02:00
<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[
2024-11-03 14:47:30 +01:00
<a href="{{ url }}"><img src='{{ protocole~"://"~appWeburl~"/"~appAlias~"/uploads/"~feed.type~"/thumbori_"~feed.illustration }}'></p>
2024-09-17 14:02:17 +02:00
<h3>{{feed.name}}</h3>
{% autoescape 'html' %}
<div class="desc">
{{feed.description|raw }}
</div>
{% endautoescape %}
]]></description>
2024-11-03 14:47:30 +01:00
<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" />
2024-09-17 14:02:17 +02:00
</item>
{% endfor %}
</channel>
</rss>
{% endautoescape %}