Commit fde57a0e authored by Thomas Löffler's avatar Thomas Löffler

Generates a valid RSS2 xml output for the latest 50 extensions

parent 99917543
Pipeline #2216 passed with stages
in 1 minute and 44 seconds
......@@ -3,16 +3,16 @@
# ======================================================================
plugin.tx_terfe2.rssOutput {
# cat=TER Frontend - RSS/rss/100; type=int+; label=Type number of the RSS page object
typeNum = 95831
typeNum = 837
# cat=TER Frontend - RSS/rss/110; type=string; label=Title of the RSS feed
title = typo3.org - Latest 50 extensions
title = TYPO3 - Latest 50 extensions
# cat=TER Frontend - RSS/rss/120; type=string; label=Link to website
link = http://typo3.org/extensions/repository
link = http://extensions.typo3.org/
# cat=TER Frontend - RSS/rss/130; type=string; label=Description
description = latest 50 extensions on typo3.org
description = latest 50 extensions on extensions.typo3.org
# cat=TER Frontend - RSS/rss/140; type=string; label=Language
language = en
......
# ======================================================================
# RSS output configuration ot the extension "ter_fe2"
# ======================================================================
plugin.tx_terfe2.settings.rssOutput {
plugin.tx_terfe2.settings.rss.channel {
typeNum = {$plugin.tx_terfe2.rssOutput.typeNum}
title = {$plugin.tx_terfe2.rssOutput.title}
link = {$plugin.tx_terfe2.rssOutput.link}
......@@ -15,16 +15,36 @@ plugin.tx_terfe2.settings.rssOutput {
dateFormat = {$plugin.tx_terfe2.rssOutput.dateFormat}
}
rssOutput = PAGE
rssOutput {
typeNum = {$plugin.tx_terfe2.rssOutput.typeNum}
10 =< tt_content.list.20.terfe2_pi1
[globalVar = TSFE:type = {$plugin.tx_terfe2.rssOutput.typeNum}]
config {
disableAllHeaderCode = 1
additionalHeaders = Content-type:application/xml
xhtml_cleaning = 0
xhtml_cleaning = none
admPanel = 0
debug = 0
disablePrefixComment = 1
metaCharset = utf-8
additionalHeaders.10.header = Content-Type:application/rss+xml;charset=utf-8
absRefPrefix = {$plugin.tx_terfe2.rssOutput.link}
}
}
\ No newline at end of file
terRss = PAGE
terRss {
typeNum = {$plugin.tx_terfe2.rssOutput.typeNum}
10 < tt_content.list.20.terfe2_pi1
10 {
controller = Extension
switchableControllerActions {
Extension {
1 = listLatest
}
}
settings < plugin.tx_terfe2.settings
settings {
limit = 50
detailPid = {$plugin.tx_terfe2.settings.pages.extensionDetailPID}
startingpoint = {$plugin.tx_terfe2.persistence.storagePid}
}
}
}
[global]
<!-- dummy for TYPO3 4.5 Extbase -->
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers">
<channel>
<title>{settings.rss.channel.title}</title>
<link>{settings.rss.channel.link}</link>
<description>{settings.rss.channel.description}</description>
<language>{settings.rss.channel.language}</language>
<f:if condition="{settings.rss.channel.copyright}">
<copyright>{settings.rss.channel.copyright}</copyright>
</f:if>
<pubDate>
<f:format.date format="r" date="now" />
</pubDate>
<lastBuildDate>
<f:format.date format="r" date="now" />
</lastBuildDate>
<f:if condition="{settings.rss.channel.category}">
<category>{settings.rss.channel.category}</category>
</f:if>
<atom:link href="{f:uri.page(pageType: 837, absolute: 1) -> f:format.htmlentities()}" rel="self" type="application/rss+xml" />
<generator>{settings.rss.channel.generator}</generator>
<f:if condition="{extensions}">
<f:for each="{extensions}" as="extension">
<item>
<guid isPermaLink="false">extension-{extension.lastVersion.uid}</guid>
<pubDate>
<f:format.date format="r">{extension.lastVersion.uploadDate}</f:format.date>
</pubDate>
<title>
<f:format.htmlspecialchars>
{extension.lastVersion.title} [{extension.extKey}] (v{extension.lastVersion.versionString})
</f:format.htmlspecialchars>
</title>
<link>
<f:format.htmlentities>
<f:uri.action pageUid="{settings.pages.extensionDetailPID}" action="show" controller="Extension" arguments="{extension : extension}" absolute="1" />
</f:format.htmlentities>
</link>
<description>{extension.lastVersion.description}</description>
</item>
</f:for>
</f:if>
</channel>
</rss>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment