I have already override the theme page layout with below files:-


code is like:-

<?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="1column"/>
    <referenceContainer name="columns">
        <container name="div.sidebar.main" htmlTag="div" htmlClass="col-02" after="main">
            <container name="sidebar.main" as="sidebar_main" label="Sidebar Main"/>
            <container name="main" label="Main Content Container"/>         
        <container name="div.sidebar.additional" htmlTag="div" htmlClass="col-01" after="div.sidebar.main">
            <container name="sidebar.additional" as="sidebar_additional" label="Sidebar Additional"/>

now all pages showing in 2column left bar.

Now I have installed the magefun blog in my store, all blog pages are also in 2column left bar instead of 2column right bar as defined in the blog's default.xml.

blog's default.xml code:-

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

So Now I want to show all blog page with their default page layout 2column-right and other theme page as their default layout 2column-left.

Please advice.


if you want to update the layout from the blog default layout handle from 2columns-right to 2columns-left, you do not need to use the override functionality (which should only be used as a fallback, if you see no other solution).

Normally, you are just extending the original layout and changing what is needed. Using the override directory will completely replace the original layout file.

You can just add the layout file to your theme and set the layout:


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

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.