Version:
TYPO3 10.4.18, News 8.5.2
Problem:
I need to generate multiple XML sitemaps, where all news originate from a single folder ID. They need to link to different news detail pages, based on different categories.
According to the documentation I need to use the extended sitemap GeorgRinger\News\Seo\NewsXmlSitemapDataProvider
, it also states the following:
Single-view page for news from this category of a sys_category you need to use a custom provider.
It also states:
To enable the category detail page handling, checkout the setting
useCategorySinglePid = 1
in the following full example:
plugin.tx_seo {
config {
xmlSitemap {
sitemaps {
news {
provider = GeorgRinger\News\Seo\NewsXmlSitemapDataProvider
config {
excludedTypes = 1,2
additionalWhere =
## enable these two lines to generate a Google News sitemap
# template = EXT:news/Resources/Private/Templates/News/GoogleNews.xml
# googleNews = 1
sortField = datetime
lastModifiedField = tstamp
pid = 84
recursive = 2
url {
pageId = 116
useCategorySinglePid = 1
hrDate = 0
hrDate {
day = j
month = n
year = Y
}
fieldToParameterMap {
uid = tx_news_pi1[news]
}
additionalGetParameters {
tx_news_pi1.controller = News
tx_news_pi1.action = detail
}
useCacheHash = 1
}
}
}
}
}
}
}
In the code above I can see that in pid
Newsitems are stored, pageId
is where the detail page is. useCategorySinglePid
enables the category detail page handling. So how and where do I define what specific category should be shown in the sitemap? Do I have to define this using additionalWhere
? The way the documentation tries to explain what needs to be done is rather confusing. Any help is greatly appreciated.