ds-site/Configuration/TypoScript/Setup/RssFeed.typoscript
Daniel Siepmann 8bcdec5d94 Finally migrate RSS Feed
Misusing the sitemap implementation was a bad idea and broke for every
major update.

I now finally migrate to custom implementation which should remove the
issues for future.
2024-02-07 18:45:17 +01:00

87 lines
2.6 KiB
Text

page {
headerData {
10 = TEXT
10 {
wrap = <link rel="alternate" title="RSS Feed of all blog posts" type="application/rss+xml" href="|" />
typolink {
parameter = t3://page?uid=1
additionalParams = &type=1707321482&feed=blog-posts
returnLast = url
}
}
11 = COA
11 {
if {
isTrue.stdWrap.data = GP:topic_uid
}
1 = TEXT
1.char = 10
2 = TEXT
2 {
noTrimWrap = |<link rel="alternate" title="RSS Feed of blog posts for topic: |" type="application/rss+xml"|
data.dataWrap = DB : sys_category:{GP:topic_uid}:title
}
3 = TEXT
3.char = 32
4 = TEXT
4 {
wrap = href="|" />
typolink {
parameter = t3://page?uid=1
additionalParams.stdWrap.cObject = COA
additionalParams.stdWrap.cObject {
10 = TEXT
10.value = &type=1707321482&feed=blog-posts
11 = TEXT
11.value = &category_uid=
12 = TEXT
// uid is casted to int within PHP source
12.data.dataWrap = DB : sys_category:{GP:topic_uid}:uid
}
returnLast = url
}
}
}
}
}
rssFeed = PAGE
rssFeed {
typeNum = 1707321482
config {
admPanel = 0
debug = 0
disableAllHeaderCode = 1
additionalHeaders {
10 {
header = Content-Type: application/xml;charset=utf-8
}
}
}
10 = FLUIDTEMPLATE
10 {
dataProcessing {
10 = DanielSiepmann\DsSite\Frontend\RssFeed\BlogPostsDataProvider
10 {
as = pages
table = pages
orderBy = lastUpdated DESC
selectFields = pages.uid, pages.abstract, pages.title, pages.lastUpdated
where = AND no_index = 0
pidInList = {$pageUids.blogPosts}
recursive = 3
}
}
variables {
categoryId = TEXT
categoryId.data = GP:category_uid
categoryId.intval = 1
categoryTitle = TEXT
categoryTitle.data.dataWrap = DB : sys_category:{GP:category_uid}:title
}
file = EXT:ds_site/Resources/Private/Templates/RssFeed.xml
}
}