Skip to content

Commit

Permalink
IBX-8534: Replaced pagelayout parameter (#1369)
Browse files Browse the repository at this point in the history
  • Loading branch information
ViniTou authored Oct 23, 2024
1 parent a74c13b commit 9d8bafa
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/lib/EventListener/ViewTemplatesListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,17 @@ public static function getSubscribedEvents(): array

/**
* If the event's view has a defined template, sets the view's template identifier,
* and the 'pagelayout' parameter.
* and the 'page_layout' parameter.
*/
public function setViewTemplates(PreContentViewEvent $event): void
{
$view = $event->getContentView();
$pagelayout = $this->configResolver->getParameter('pagelayout');
$pageLayout = $this->configResolver->getParameter('page_layout');

foreach ($this->getTemplatesMap() as $viewClass => $template) {
if ($view instanceof $viewClass) {
$view->setTemplateIdentifier($template);
$view->addParameters(['pagelayout' => $pagelayout]);
$view->addParameters(['page_layout' => $pagelayout]);
$view->addParameters(['page_layout' => $pageLayout]);
}
}
}
Expand Down

0 comments on commit 9d8bafa

Please sign in to comment.