Skip to content

Commit

Permalink
[FEATURE] Allow to set a ttl for the rss feed
Browse files Browse the repository at this point in the history
  • Loading branch information
KrohnMi committed Nov 23, 2023
1 parent 162b987 commit 104ed68
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Configuration/TypoScript/constants.typoscript
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ plugin.tx_news {
generator = TYPO3 EXT:news
# cat=plugin.tx_news/rss; type=int+; label=Page Type Number
typeNum = 9818
# cat=plugin.tx_news/rss; type=int+; label=Number of minutes the feed can stay cached
ttl =
}

opengraph {
Expand Down
1 change: 1 addition & 0 deletions Configuration/TypoScript/setup.typoscript
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ plugin.tx_news {
generator = {$plugin.tx_news.rss.channel.generator}
link = {$plugin.tx_news.rss.channel.link}
typeNum = {$plugin.tx_news.rss.channel.typeNum}
typeNum = {$plugin.tx_news.rss.channel.ttl}
}
}
}
Expand Down
1 change: 1 addition & 0 deletions Documentation/Tutorials/BestPractice/Rss/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ Don't forget to configure the RSS feed properly as the sample template won't ful
copyright = TYPO3 News
category =
generator = TYPO3 EXT:news
ttl =
}
Expand Down
3 changes: 3 additions & 0 deletions Resources/Private/Templates/News/List.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
<f:if condition="{settings.list.rss.channel.copyright}">
<copyright>{settings.list.rss.channel.copyright}</copyright>
</f:if>
<f:if condition="{settings.list.rss.channel.ttl}">
<ttl>{settings.list.rss.channel.ttl}</ttl>
</f:if>
<pubDate><f:format.date format="r" date="now" /></pubDate>
<lastBuildDate><f:format.date format="r" date="now" /></lastBuildDate>
<f:if condition="{settings.list.rss.channel.category}">
Expand Down

0 comments on commit 104ed68

Please sign in to comment.