Custom layout extending 2columns-left.xml problem












0















I'm trying to create a custom layout based on 2columns-left.xml. The layout was created correctly and I can select it from the Admin. This is what I did so far:



I created the layouts.xml file THEME/Magento_Theme/layouts.xml



And then I created the customlayout.xml file THEME/Magento_Theme/page_layout/customlayout.xml
With the same content as:




vendor/magento/module-theme/view/frontend/page_layout/2columns-left.xml




The problem is that the layout has only 1 column, instead of 2columns-left, why?



Thank you.



This is a repeat of the Custom Layout extending 2 columns left, there was no response and I would like to get this issue solved thanks!










share|improve this question

























  • can you please share your layout file code?

    – Ali Ejaz
    10 mins ago
















0















I'm trying to create a custom layout based on 2columns-left.xml. The layout was created correctly and I can select it from the Admin. This is what I did so far:



I created the layouts.xml file THEME/Magento_Theme/layouts.xml



And then I created the customlayout.xml file THEME/Magento_Theme/page_layout/customlayout.xml
With the same content as:




vendor/magento/module-theme/view/frontend/page_layout/2columns-left.xml




The problem is that the layout has only 1 column, instead of 2columns-left, why?



Thank you.



This is a repeat of the Custom Layout extending 2 columns left, there was no response and I would like to get this issue solved thanks!










share|improve this question

























  • can you please share your layout file code?

    – Ali Ejaz
    10 mins ago














0












0








0








I'm trying to create a custom layout based on 2columns-left.xml. The layout was created correctly and I can select it from the Admin. This is what I did so far:



I created the layouts.xml file THEME/Magento_Theme/layouts.xml



And then I created the customlayout.xml file THEME/Magento_Theme/page_layout/customlayout.xml
With the same content as:




vendor/magento/module-theme/view/frontend/page_layout/2columns-left.xml




The problem is that the layout has only 1 column, instead of 2columns-left, why?



Thank you.



This is a repeat of the Custom Layout extending 2 columns left, there was no response and I would like to get this issue solved thanks!










share|improve this question
















I'm trying to create a custom layout based on 2columns-left.xml. The layout was created correctly and I can select it from the Admin. This is what I did so far:



I created the layouts.xml file THEME/Magento_Theme/layouts.xml



And then I created the customlayout.xml file THEME/Magento_Theme/page_layout/customlayout.xml
With the same content as:




vendor/magento/module-theme/view/frontend/page_layout/2columns-left.xml




The problem is that the layout has only 1 column, instead of 2columns-left, why?



Thank you.



This is a repeat of the Custom Layout extending 2 columns left, there was no response and I would like to get this issue solved thanks!







magento2 layout frontend






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 16 mins ago









Abhishek Panchal

3,4233929




3,4233929










asked 17 mins ago









Brandon IrwinBrandon Irwin

368




368













  • can you please share your layout file code?

    – Ali Ejaz
    10 mins ago



















  • can you please share your layout file code?

    – Ali Ejaz
    10 mins ago

















can you please share your layout file code?

– Ali Ejaz
10 mins ago





can you please share your layout file code?

– Ali Ejaz
10 mins ago










1 Answer
1






active

oldest

votes


















0














You need to change your handle like,





<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>






share























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "479"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f257914%2fcustom-layout-extending-2columns-left-xml-problem%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    You need to change your handle like,





    <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>






    share




























      0














      You need to change your handle like,





      <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>






      share


























        0












        0








        0







        You need to change your handle like,





        <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>






        share













        You need to change your handle like,





        <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>







        share











        share


        share










        answered 7 mins ago









        Ali EjazAli Ejaz

        32610




        32610






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Magento Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f257914%2fcustom-layout-extending-2columns-left-xml-problem%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Polycentropodidae

            Magento 2 Error message: Invalid state change requested

            Paulmy