1

I need to change all my products to the page layout "2column left". Now is everything set on 1column. How can I do this in one step for all the products?

4
0

You can overwrite Magento_Catalog with layout file named catalog_product_view.xml by custom module and put this layout (2columns-left) in it.

 <page layout="2columns-left" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">

Hope this will help you.

0

Create a catalog_product_view.xml under your theme like below:

app/design/frontend/Vendor/theme/Magento_Catalog/layout/catalog_product_view.xml

and paste the below content to it:

<?xml version="1.0"?>
<page layout="2columns-left" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
</body>

You can create catalog_product_view.xml under any different module as well.

3
  • Thank you for the reaction. I created this xml file and added the code, but there is no change. I also deleted the cache. – NielN98 Oct 24 '18 at 17:58
  • Check the working theme and try to flush the cache it should work. – Sukumar Gorai Oct 24 '18 at 18:05
  • Sorry, but it do not work... – NielN98 Nov 1 '18 at 20:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.