ninefolio/templates/Home/feed.xml.twig
2024-09-17 14:02:17 +02:00

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,{"idcat":feed.idcat,"id":feed.id}))|replace({'http://': 'https://'}) %}
<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='{{ "https://"~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="{{ "https://"~appWeburl~"/"~appAlias~"/uploads/"~feed.type~"/thumbori_"~feed.illustration }}" rel="thumb" />
<enclosure url="{{ "https://"~appWeburl~"/"~appAlias~"/uploads/"~feed.type~"/"~feed.illustration }}" rel="big" />
</item>
{% endfor %}
</channel>
</rss>
{% endautoescape %}