Skip to content

Commit

Permalink
Merge pull request #3342 from bolt/fix/listingcontroller
Browse files Browse the repository at this point in the history
Pass other `_route_params` into a forwarded request
  • Loading branch information
bobdenotter authored Oct 28, 2022
2 parents 1dbb92b + f8ba14c commit 3b73bae
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Controller/Frontend/ListingController.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ public function listing(ContentRepository $contentRepository, string $contentTyp
$route = $content->getDefinition()->get('record_route');
$controller = $this->container->get('router')->getRouteCollection()->get($route)->getDefault('_controller');

return $this->forward($controller, ['slugOrId' => $content->getId()]);
$parameters = $this->request->attributes->all();
$parameters['slugOrId'] = $content->getId();

return $this->forward($controller, $parameters);
}

$records = $this->setRecords($content, $amountPerPage, $page);
Expand Down

0 comments on commit 3b73bae

Please sign in to comment.