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 { ...@@ -43,12 +43,7 @@ class NewsFeedController extends AbstractController {
*/ */
public function indexAction() { public function indexAction() {
$news = $this->newsRepository->findLastUpdatedOrHighlightedNewsByCategory(10, FALSE); $news = $this->newsRepository->findLastUpdatedOrHighlightedNewsByCategory(10, FALSE);
$this->view->assignMultiple( $this->view->assign('news', $news);
[
'news' => $news,
'absoluteUrl' => $GLOBALS['TSFE']->absRefPrefix
]
);
} }
} }
......
...@@ -46,6 +46,7 @@ plugin.tx_sgnews { ...@@ -46,6 +46,7 @@ plugin.tx_sgnews {
settings { settings {
siteName = siteName =
facebookPublisher = facebookPublisher =
rootpageId = 1
newsLimitPerPage = {$plugin.tx_sgnews.settings.newsLimitPerPage} newsLimitPerPage = {$plugin.tx_sgnews.settings.newsLimitPerPage}
} }
......
<?xml version="1.0" encoding="utf-8"?>{namespace sg=SGalinski\SgNews\ViewHelpers} <?xml version="1.0" encoding="utf-8"?>{namespace sg=SGalinski\SgNews\ViewHelpers}
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="de"> <feed xmlns="http://www.w3.org/2005/Atom" xml:lang="de">
<title>News Feed</title> <title>News Feed</title>
<link href="{absoluteUrl}" /> <link href="{f:uri.page(pageUid: '{rootpageId}', absolute: '1')}" />
<link rel="self" type="application/atom+xml" href="{absoluteUrl}news.xml" /> <link rel="self" type="application/atom+xml" href="{f:uri.page(pageUid: '{rootpageId}', absolute: '1', pageType: '78906523')}" />
<id>{absoluteUrl}news.xml</id> <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> <updated>{news.0.lastUpdated -> f:format.date(format: "Y-m-d\TH:i:s+01:00")}</updated>
<subtitle type="html">News Feed - {absoluteUrl}</subtitle> <subtitle type="html">News Feed - {absoluteUrl}</subtitle>
<author> <author>
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
<f:for each="{news}" as="singleNews"> <f:for each="{news}" as="singleNews">
<entry> <entry>
<title>{singleNews.subtitleWithFallbackToTitle}</title> <title>{singleNews.subtitleWithFallbackToTitle}</title>
<link href="{f:uri.page(pageUid: '{singleNews.uid}')}" /> <link href="{f:uri.page(pageUid: '{singleNews.uid}', absolute: '1')}" />
<id>{f:uri.page(pageUid: '{singleNews.uid}')}</id> <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> <updated>{singleNews.lastUpdated -> f:format.date(format: "Y-m-d\TH:i:s+01:00")}</updated>
<summary type="html">{singleNews.description}</summary> <summary type="html">{singleNews.description}</summary>
</entry> </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