Skip to content

Commit

Permalink
Fix listing_records in taxonomy
Browse files Browse the repository at this point in the history
Allow to change number of records displaying in taxonomy listing
  • Loading branch information
Fredxd authored Dec 20, 2023
1 parent 7b8c7e0 commit 7c5fdb0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Controller/Frontend/TaxonomyController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 7c5fdb0

Please sign in to comment.