Skip to content

Commit

Permalink
IBX-8534: Renamed pagelayout parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
ViniTou committed Oct 15, 2024
1 parent b115e5a commit 76d3bc7
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 @@ -51,18 +51,17 @@ public function setUserEditViewTemplateParameters(PreContentViewEvent $event): v

/**
* 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 76d3bc7

Please sign in to comment.