Skip to content

Commit 32a18b6

Browse files
authored
Merge pull request #463 from georg-tiefenbrunn/main
[BUGFIX] Re-enable BE Previews for Page Types #462
2 parents f41e15a + ecffa27 commit 32a18b6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Classes/Backend/Preview/PageLayout.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
use TYPO3\CMS\Backend\Controller\Event\ModifyPageLayoutContentEvent;
2222
use TYPO3\CMS\Backend\Module\ModuleData;
2323
use TYPO3\CMS\Backend\Utility\BackendUtility;
24+
use TYPO3\CMS\Backend\View\PageViewMode;
2425
use TYPO3\CMS\ContentBlocks\DataProcessing\ContentBlockDataDecorator;
2526
use TYPO3\CMS\ContentBlocks\DataProcessing\ContentTypeResolver;
2627
use TYPO3\CMS\ContentBlocks\Definition\ContentType\ContentTypeInterface;
@@ -55,8 +56,8 @@ public function __invoke(ModifyPageLayoutContentEvent $event): void
5556
$request = $event->getRequest();
5657
/** @var ModuleData $moduleData */
5758
$moduleData = $request->getAttribute('moduleData');
58-
$function = (int)($moduleData->get('function') ?? 0);
59-
if ($function !== 1) {
59+
$viewMode = PageViewMode::LayoutView::tryFrom((int)$moduleData->get('viewMode'));
60+
if ($viewMode !== PageViewMode::LayoutView) {
6061
return;
6162
}
6263
$pageTypeTable = 'pages';

0 commit comments

Comments
 (0)