File tree Expand file tree Collapse file tree 3 files changed +59
-3
lines changed
app/code/Magento/PageBuilder
view/frontend/page_layout Expand file tree Collapse file tree 3 files changed +59
-3
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * Copyright © Magento, Inc. All rights reserved.
4
+ * See COPYING.txt for license details.
5
+ */
6
+
7
+ declare (strict_types=1 );
8
+
9
+ namespace Magento \PageBuilder \Plugin \Result ;
10
+
11
+ use Magento \Framework \App \ResponseInterface ;
12
+ use Magento \Framework \View \Element \Context ;
13
+ use Magento \Framework \View \Result \Page as ResultPage ;
14
+
15
+ class Page
16
+ {
17
+ /**
18
+ * @var \Magento\Framework\View\Element\Context
19
+ */
20
+ private $ context ;
21
+
22
+ /**
23
+ * @param Context $context
24
+ */
25
+ public function __construct (
26
+ Context $ context
27
+ ) {
28
+ $ this ->context = $ context ;
29
+ }
30
+
31
+ /**
32
+ * @param ResultPage $subject
33
+ * @param ResponseInterface $response
34
+ * @return array
35
+ */
36
+ public function beforeRenderResult (
37
+ ResultPage $ subject ,
38
+ ResponseInterface $ response
39
+ ) {
40
+ // Apply the updated layout handles classes to the body when using our full width variants
41
+ if ($ subject ->getConfig ()->getPageLayout () == 'product-full-width ' ) {
42
+ $ subject ->getConfig ()->addBodyClass ('page-layout-1column ' );
43
+ }
44
+
45
+ return [$ response ];
46
+ }
47
+ }
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" ?>
2
+ <!--
3
+ /**
4
+ * Copyright © Magento, Inc. All rights reserved.
5
+ * See COPYING.txt for license details.
6
+ */
7
+ -->
8
+ <config xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" urn:magento:framework:ObjectManager/etc/config.xsd" >
9
+ <type name =" Magento\Framework\View\Result\Page" >
10
+ <plugin name =" pageLayoutDefaultClass" type =" Magento\PageBuilder\Plugin\Result\Page" />
11
+ </type >
12
+ </config >
Original file line number Diff line number Diff line change 8
8
<layout xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" urn:magento:framework:View/Layout/etc/page_layout.xsd" >
9
9
<update handle =" 1column" />
10
10
11
- <!-- Ensure the 1column page layout class is present in the DOM -->
12
- <referenceContainer name =" page.wrapper" htmlClass =" page-wrapper page-layout-1column" />
13
-
14
11
<referenceContainer name =" page.wrapper" >
15
12
<!-- Create new product details wrapper under main.content for tabs section -->
16
13
<container name =" product.info.details.wrapper" after =" main.content" htmlTag =" div" htmlClass =" page-main page-main-details" >
You can’t perform that action at this time.
0 commit comments