0

is there a faster way to change the layout from 2columns-left to 3columns to all the personal area pages (account, wishlist, orders etc..) ?

i just got done creating this file:

app/design/frontend/Vendor/Vendor/Magento_Customer/layout/customer_account_index.xml

and adding this code:

<?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="3columns" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd" label="Customer My Account (All Pages)" design_abstraction="custom"> <body> </body> </page> 

and it worked too, only to find out that if i click on the other pages from the dropdown menu, "orders" for example, the layout remains as 2columns-left.

Is there a way to change the layout to multiple pages (not all of them!) that is faster than overriding every single .xml file?

1 Answer 1

0

You can try the below code.

<!-- File path: app/design/frontend/Vendor/Theme/Magento_Customer/layout/customer_account_custom.xml --> <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation=" urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <!-- Apply 3columns layout to specific pages --> <body> <referenceContainer name="root"> <arguments> <argument name="page_layout" xsi:type="string">3columns</argument> </arguments> </referenceContainer> <!-- Customer Account Dashboard --> <referenceBlock name="customer_account_dashboard" ifconfig="customer/startup/redirect_dashboard"> <arguments> <argument name="page_layout" xsi:type="string">3columns</argument> </arguments> </referenceBlock> <!-- Customer Wishlist --> <referenceBlock name="customer.wishlist" ifconfig="wishlist/general/active"> <arguments> <argument name="page_layout" xsi:type="string">3columns</argument> </arguments> </referenceBlock> <!-- Customer Orders --> <referenceBlock name="sales.order.history"> <arguments> <argument name="page_layout" xsi:type="string">3columns</argument> </arguments> </referenceBlock> </body> </page> 

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.