diff --git a/controllers/admin/AdminLegacyLayoutController.php b/controllers/admin/AdminLegacyLayoutController.php index 62c7a113b2c37..13274e48514ea 100644 --- a/controllers/admin/AdminLegacyLayoutController.php +++ b/controllers/admin/AdminLegacyLayoutController.php @@ -84,7 +84,9 @@ public function __construct( $helpLink = '', $jsRouterMetadata = [], $metaTitle = '', - $useRegularH1Structure = true + $useRegularH1Structure = true, + $displayHeader = true, + $displayFooter = true ) { // Compatibility with legacy behavior. // Some controllers can only be used in "All stores" context. @@ -125,6 +127,8 @@ public function __construct( $this->className = 'LegacyLayout'; $this->jsRouterMetadata = $jsRouterMetadata; $this->useRegularH1Structure = $useRegularH1Structure; + $this->display_header = $displayHeader; + $this->display_footer = $displayFooter; } /** diff --git a/src/Adapter/LegacyContext.php b/src/Adapter/LegacyContext.php index a2bf0b6de3e80..a190cc00ba918 100644 --- a/src/Adapter/LegacyContext.php +++ b/src/Adapter/LegacyContext.php @@ -223,7 +223,9 @@ public function getLegacyLayout( $jsRouterMetadata = [], $metaTitle = '', $useRegularH1Structure = true, - $baseLayout = 'layout.tpl' + $baseLayout = 'layout.tpl', + $displayHeader = true, + $displayFooter = true ) { $originCtrl = new AdminLegacyLayoutControllerCore( $controllerName, @@ -236,7 +238,9 @@ public function getLegacyLayout( $helpLink, $jsRouterMetadata, $metaTitle, - $useRegularH1Structure + $useRegularH1Structure, + $displayHeader, + $displayFooter ); $originCtrl->layout = $baseLayout; $originCtrl->run(); diff --git a/src/PrestaShopBundle/Resources/views/Admin/layout.html.twig b/src/PrestaShopBundle/Resources/views/Admin/layout.html.twig index 96ac83208156b..a8611e7ae014e 100644 --- a/src/PrestaShopBundle/Resources/views/Admin/layout.html.twig +++ b/src/PrestaShopBundle/Resources/views/Admin/layout.html.twig @@ -26,6 +26,8 @@ {% set showContentHeader = showContentHeader is defined ? showContentHeader : true %} {% set layoutHeaderToolbarBtn = layoutHeaderToolbarBtn is defined ? layoutHeaderToolbarBtn : [] %} {% set metaTitle = meta_title is defined ? meta_title : (layoutTitle is defined ? layoutTitle : '') %} +{% set displayHeader = displayHeader is defined ? displayHeader : true %} +{% set displayFooter = displayFooter is defined ? displayFooter : true %} {# if the Symfony layout feature flag is enabled, we display the default layout or the light layout, #} {# otherwise we display the legacy layout #} @@ -44,7 +46,9 @@ js_router_metadata(), meta_title is defined ? meta_title : '', use_regular_h1_structure is defined ? use_regular_h1_structure : true, - legacyBaseLayout is defined ? legacyBaseLayout : 'layout.tpl' + legacyBaseLayout is defined ? legacyBaseLayout : 'layout.tpl', + displayHeader, + displayFooter ) ) ) %}