Skip to content
Snippets Groups Projects
Commit 2fb59264 authored by Stefan Galinski's avatar Stefan Galinski :video_game:
Browse files

[BUGFIX] Fix the url handling for the feed file

parent d856dbf0
No related branches found
No related tags found
No related merge requests found
......@@ -43,12 +43,7 @@ class NewsFeedController extends AbstractController {
*/
public function indexAction() {
$news = $this->newsRepository->findLastUpdatedOrHighlightedNewsByCategory(10, FALSE);
$this->view->assignMultiple(
[
'news' => $news,
'absoluteUrl' => $GLOBALS['TSFE']->absRefPrefix
]
);
$this->view->assign('news', $news);
}
}
......
......@@ -46,6 +46,7 @@ plugin.tx_sgnews {
settings {
siteName =
facebookPublisher =
rootpageId = 1
newsLimitPerPage = {$plugin.tx_sgnews.settings.newsLimitPerPage}
}
......
<?xml version="1.0" encoding="utf-8"?>{namespace sg=SGalinski\SgNews\ViewHelpers}
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="de">
<title>News Feed</title>
<link href="{absoluteUrl}" />
<link rel="self" type="application/atom+xml" href="{absoluteUrl}news.xml" />
<id>{absoluteUrl}news.xml</id>
<link href="{f:uri.page(pageUid: '{rootpageId}', absolute: '1')}" />
<link rel="self" type="application/atom+xml" href="{f:uri.page(pageUid: '{rootpageId}', absolute: '1', pageType: '78906523')}" />
<id>{f:uri.page(pageUid: '{rootpageId}', absolute: '1')}news.xml</id>
<updated>{news.0.lastUpdated -> f:format.date(format: "Y-m-d\TH:i:s+01:00")}</updated>
<subtitle type="html">News Feed - {absoluteUrl}</subtitle>
<author>
......@@ -12,8 +12,8 @@
<f:for each="{news}" as="singleNews">
<entry>
<title>{singleNews.subtitleWithFallbackToTitle}</title>
<link href="{f:uri.page(pageUid: '{singleNews.uid}')}" />
<id>{f:uri.page(pageUid: '{singleNews.uid}')}</id>
<link href="{f:uri.page(pageUid: '{singleNews.uid}', absolute: '1')}" />
<id>{f:uri.page(pageUid: '{singleNews.uid}', absolute: '1')}</id>
<updated>{singleNews.lastUpdated -> f:format.date(format: "Y-m-d\TH:i:s+01:00")}</updated>
<summary type="html">{singleNews.description}</summary>
</entry>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment