From 7c5fdb04b9d55dfff81be84bf1040f85431a680c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric?= Date: Wed, 20 Dec 2023 17:05:54 +0100 Subject: [PATCH] Fix listing_records in taxonomy Allow to change number of records displaying in taxonomy listing --- src/Controller/Frontend/TaxonomyController.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Controller/Frontend/TaxonomyController.php b/src/Controller/Frontend/TaxonomyController.php index c6d18edb5..7aadbdd42 100644 --- a/src/Controller/Frontend/TaxonomyController.php +++ b/src/Controller/Frontend/TaxonomyController.php @@ -34,6 +34,10 @@ public function listing(ContentRepository $contentRepository, string $taxonomysl $taxonomy = TaxonomyType::factory($taxonomyslug, $this->config->get('taxonomies')); + if ($taxonomy->has('listing_records')) { + $amountPerPage = $taxonomy->get('listing_records'); + } + /** @var Content[] $records */ $records = $contentRepository->findForTaxonomy($page, $taxonomy, $slug, $amountPerPage);