Streamline routing parameter name
Use category_id instead of category. TYPO3 forces sitemap but we use an uid and therefore should use category_id beside existing topic_id.
This commit is contained in:
parent
d8a9608cec
commit
5358b7f914
3 changed files with 5 additions and 5 deletions
|
@ -42,7 +42,7 @@ class SitemapDataProvider extends RecordsXmlSitemapDataProvider
|
|||
array $config = [],
|
||||
ContentObjectRenderer $cObj = null
|
||||
) {
|
||||
$categoryUid = intval($request->getQueryParams()['category'] ?? 0);
|
||||
$categoryUid = intval($request->getQueryParams()['category_id'] ?? 0);
|
||||
if ($categoryUid > 0) {
|
||||
$pageUids = $this->getPageUidsWithRelationToCategory($categoryUid);
|
||||
$config['additionalWhere'] = ($config['additionalWhere'] ?? '')
|
||||
|
|
|
@ -59,7 +59,7 @@ page {
|
|||
10 = TEXT
|
||||
10.value = &type=1533906435&sitemap=blog-posts
|
||||
11 = TEXT
|
||||
11.value = &category=
|
||||
11.value = &category_id=
|
||||
12 = TEXT
|
||||
// uid is casted to int within PHP source
|
||||
12.data.dataWrap = DB : sys_category:{GP:topic_id}:uid
|
||||
|
@ -77,10 +77,10 @@ seo_sitemap {
|
|||
userFunc {
|
||||
variables {
|
||||
categoryId = TEXT
|
||||
categoryId.data = GP:category
|
||||
categoryId.data = GP:category_id
|
||||
categoryId.intval = 1
|
||||
categoryTitle = TEXT
|
||||
categoryTitle.data.dataWrap = DB : sys_category:{GP:category}:title
|
||||
categoryTitle.data.dataWrap = DB : sys_category:{GP:category_id}:title
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<title>Daniel Siepmann - Coding is Art - Blog Posts {settings.categoryTitle}</title>
|
||||
<description>List of {settings.categoryTitle} blog posts at daniel-siepmann.de</description>
|
||||
<link>{f:uri.page(pageUid: 11, additionalParams: {topic_id: settings.categoryId}, absolute: 1)}</link>
|
||||
<atom:link href="{f:uri.page(pageUid: 1. pageType: 1533906435, additionalParams: {sitemap: 'blog-posts', category: settings.categoryId}, absolute: 1)}" rel="self" type="application/rss+xml" />
|
||||
<atom:link href="{f:uri.page(pageUid: 1. pageType: 1533906435, additionalParams: {sitemap: 'blog-posts', category_id: settings.categoryId}, absolute: 1)}" rel="self" type="application/rss+xml" />
|
||||
</f:then>
|
||||
<f:else>
|
||||
<title>Daniel Siepmann - Coding is Art - All Blog Posts</title>
|
||||
|
|
Loading…
Reference in a new issue