diff --git a/Admin/ArticleAdmin.php b/Admin/ArticleAdmin.php index 8e0df371..f2cd45a8 100644 --- a/Admin/ArticleAdmin.php +++ b/Admin/ArticleAdmin.php @@ -260,6 +260,8 @@ function(Localization $localization) { ]; } + $previewCondition = 'route != null'; + $viewCollection->add( $this->viewBuilderFactory->createListViewBuilder(static::LIST_VIEW . '_' . $typeKey, '/:locale/' . $typeKey) ->setResourceKey(ArticleDocument::RESOURCE_KEY) @@ -308,6 +310,7 @@ function(Localization $localization) { ->setTabCondition('shadowOn == false') ->setTabPriority(1024) ->addToolbarActions($formToolbarActionsWithType) + ->setPreviewCondition($previewCondition) ->setParent(static::EDIT_FORM_VIEW . '_' . $typeKey) ); $viewCollection->add( @@ -318,6 +321,7 @@ function(Localization $localization) { ->setTabCondition('shadowOn == false') ->addToolbarActions($formToolbarActionsWithoutType) ->setTitleVisible(true) + ->setPreviewCondition($previewCondition) ->setParent(static::EDIT_FORM_VIEW . '_' . $typeKey) ); $viewCollection->add( @@ -328,6 +332,7 @@ function(Localization $localization) { ->setTabCondition('shadowOn == false') ->addToolbarActions($formToolbarActionsWithoutType) ->setTitleVisible(true) + ->setPreviewCondition($previewCondition) ->setParent(static::EDIT_FORM_VIEW . '_' . $typeKey) ); $viewCollection->add( @@ -338,6 +343,7 @@ function(Localization $localization) { ->setTabPriority(512) ->addToolbarActions($formToolbarActionsWithoutType) ->setTitleVisible(true) + ->setPreviewCondition($previewCondition) ->setParent(static::EDIT_FORM_VIEW . '_' . $typeKey) );