0

I have created a layout XML file for a custom theme which inherits from the default Magento Blank theme:

app/design/frontend/<Vendor>/<Theme>/Magento_Catalog/layout/catalog_product_view.xml

and set the layout to 2columns-left:

<?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">
</page>

Also the setting under: "Stores > Configuration > General > Web > Default Layout" doesn't seem to have any effect.

Magento version: 2.3.2 CE

2
  • you run all command and apply permission Apr 28, 2020 at 11:49
  • yes, I've run all commands and permissions are properly set. The site is in development mode, all caches are disabled, except the configuration cache. All layout changes in catalog_product_view.xml are working (moving and removing elements), except setting it to a two column layout.
    – a-h
    Apr 28, 2020 at 11:57

1 Answer 1

0

In addition to catalog_product_view.xml , you are required to create 2columns-left.xml
Path will be app/design/frontend/<Vendor>/<Theme>/default/Magento_Theme/templates/2columns-left.xml .

<?xml version="1.0"?>
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_layout.xsd">
    <update handle="2columns-left"/>
    <referenceContainer name="columns">
        <container name="div.sidebar.main" htmlTag="div" htmlClass="sidebar sidebar-main" after="main">
            <container name="sidebar.main" as="sidebar_main" label="Sidebar Main"/>
        </container>
        <container name="div.sidebar.additional" htmlTag="div" htmlClass="sidebar sidebar-additional" after="div.sidebar.main">
            <container name="sidebar.additional" as="sidebar_additional" label="Sidebar Additional"/>
        </container>
    </referenceContainer>
</layout>

Upgrade and deploy static file after these changes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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