From 2fa8691e20549db028f984534da531aecd9fe295 Mon Sep 17 00:00:00 2001 From: Kevin Ditscheid <kevin.ditscheid@sgalinski.de> Date: Fri, 19 Jan 2024 15:49:13 +0100 Subject: [PATCH] [BUGFIX] Add pagebrowser parameter to canonical if current page > first page --- Classes/Controller/JoblistController.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Classes/Controller/JoblistController.php b/Classes/Controller/JoblistController.php index 483c525b..a0066ae8 100644 --- a/Classes/Controller/JoblistController.php +++ b/Classes/Controller/JoblistController.php @@ -71,8 +71,6 @@ use TYPO3\CMS\Extbase\Mvc\Exception\NoSuchArgumentException; use TYPO3\CMS\Extbase\Persistence\Exception\IllegalObjectTypeException; use TYPO3\CMS\Extbase\Property\Exception\TypeConverterException; use TYPO3\CMS\Extbase\Utility\LocalizationUtility; -use TYPO3\CMS\Extbase\Validation\Validator\ConjunctionValidator; -use TYPO3\CMS\Extbase\Validation\Validator\GenericObjectValidator; use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer; use TYPO3\CMS\Frontend\Controller\ErrorController; use TYPO3\CMS\Frontend\Page\PageAccessFailureReasons; @@ -260,6 +258,17 @@ class JoblistController extends ActionController { )['persistence']['storagePid'] ); + if ($currentPageBrowserPage > 0 && ExtensionManagementUtility::isLoaded('sg_seo')) { + $headTagService = GeneralUtility::makeInstance( + HeadTagService::class, + FALSE, + '', + '', + '&tx_sgjobs_pagebrowser[currentPage]=' . $currentPageBrowserPage + ); + $headTagService->execute(); + } + $this->assignFilterValues($storagePids, $filters); $this->view->assign('recordPageIds', $storagePids); $jobLimit = (int) $this->settings['jobLimit']; -- GitLab