<rss version="2.0"
     xmlns:atom="http://www.w3.org/2005/Atom"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:ev="http://purl.org/rss/1.0/modules/event/">
    <channel>
        <title>{stratisConfig.siteTitle} : {s:l(key:'annuaires.allLink')}</title>
        <link>{v:page.absoluteUrl() -> f:format.htmlspecialchars()}</link>
        <description>{s:l(key:'annuaires.allLink')} {s:l(key:'rss.consult')} {v:site.url() -> v:format.replace(substring:'http://',replacement:'') -> v:format.replace(substring:'https://',replacement:'') -> v:format.trim(characters:'/')}</description>
        <language>{settings.list.rss.channel.language}</language>
        <copyright>{stratisVar.client}</copyright>
        <atom:link href="{v:page.absoluteUrl() -> f:format.htmlspecialchars()}" rel="self" type="application/rss+xml"/>
        <v:variable.set name="lastNewsTimestamp" value="{sn:lastNewsTimestamp(pid: settings.startingpoint)}" />
        <lastBuildDate><s:l key="rss.date.day.{f:format.date(format:'%w', date:lastNewsTimestamp)}"/>, <f:format.date format="%d" date="{lastNewsTimestamp}"/> <s:l key="rss.date.month.{f:format.date(format:'%m', date:lastNewsTimestamp)}"/> <f:format.date format="%Y %T %z" date="{lastNewsTimestamp}"/></lastBuildDate>
        <f:if condition="{settings.list.rss.channel.category}"><category>{settings.list.rss.channel.category}</category></f:if>
        <generator>{settings.list.rss.channel.generator}</generator>
        <f:if condition="{news}">
            <f:for each="{news}" as="newsItem">
                <item>
                    <guid isPermaLink="false">news-{newsItem.uid}</guid>
                    <pubDate><s:l key="rss.date.day.{f:format.date(format:'%w', date:newsItem.datetime)}"/>, <f:format.date format="%d" date="{newsItem.datetime}"/> <s:l key="rss.date.month.{f:format.date(format:'%m', date:newsItem.datetime)}"/> <f:format.date format="%Y" date="{newsItem.datetime}"/> <f:if condition="{newsItem.startHour}"><f:then>{s:format.gmstrftime(format:'%H:%M:%S', content:newsItem.startHour)}</f:then><f:else>00:00:00</f:else></f:if> <f:format.date format="%z" date="{newsItem.datetime}"/></pubDate>
                    <title>{newsItem.title -> f:format.htmlspecialchars()}</title>
                    <link>{f:uri.page(absolute:1, additionalParams:'{tx_news_pi1: {news: newsItem.uid}}') -> f:format.htmlspecialchars()}</link>
                    <ev:startdate><v:format.trim><f:render partial="Common/DisplayDateHour.html" section="StartDateHourForRSS" arguments="{newsItem:newsItem, settings:settings}"/></v:format.trim></ev:startdate>
                    <ev:enddate><v:format.trim><f:render partial="Common/DisplayDateHour.html" section="EndDateHourForRSS"  arguments="{newsItem:newsItem, settings:settings}"/></v:format.trim></ev:enddate>
                    <f:if condition="{newsItem.categories}"><category>{newsItem.categories -> v:iterator.extract(key:'title') -> v:iterator.implode(glue:', ') -> f:format.htmlspecialchars()}</category></f:if>
                    <description><f:render section="description" arguments="{_all}"/></description>
                    <content:encoded><f:render section="description" arguments="{_all}"/></content:encoded>
                    <f:render partial="ListImage" section="HomeOrMainOrFalImage" arguments="{newsItem: newsItem, width:'800c', height:'800c'}"/>
                </item>
            </f:for>
        </f:if>
    </channel>
</rss>
<f:section name="description">
    <f:format.cdata><v:format.trim><v:format.eliminate tabs="1" unixBreaks="1" windowsBreaks="1">
        <p>
            Date : <f:render partial="Common/DisplayDateHour" section="DisplayDateHour" arguments="{newsItem:newsItem, stratisVar:stratisVar}"/> <f:render partial="Common/DisplayDateHour" section="DisplayHour" arguments="{newsItem:newsItem, settings:settings, stratisVar:stratisVar}"/>
            <f:if condition="{newsItem.relatedLocations}">
                <f:then><br />Lieu : <f:render partial="Common/DisplayLocations" section="Locations" arguments="{newsItem:newsItem, settings:settings, stratisVar:stratisVar}"/></f:then>
            </f:if>
        </p>
        <p>Catégorie{f:if(condition:'{newsItem.categories -> f:count()} > 1', then:'s')} : <v:render.template file="EXT:stratis_site/Resources/Private/Partials/Common/InlineList.html" variables="{records:newsItem.categories, glue:', '}"/></p>
        <p>{newsItem.teaser -> f:format.nl2br()}</p>
        <f:if condition="{newsItem.type}">
          <f:else><f:if condition="{newsItem.bodytext}"><f:format.html parseFuncTSPath="lib.parseFunc_RTE">{newsItem.bodytext}</f:format.html></f:if></f:else>
        </f:if>
    </v:format.eliminate></v:format.trim></f:format.cdata>
</f:section>
