How to add a CMS Block via XML layout update in Magento 2?CMS XML Handles for Layout UpdatesHow can i rewrite TierPrice Block in Magento2convert widget block codes to phtml and xml layoutHow to add left sidebar to CMS pages?How do I add a css class to a CMS static block?magento 2 captcha not rendering if I override layout xmlHow to create a cms block with existing block content using widget in Magento 2?Add CMS Block to Sidebar in whole magento 2 siteHow insert static block all CMS page sidebar left sidebar Magento 2.x?Magento 2 : hide sidebar on mobile view

'Us students' - Does this apposition need a comma?

Algorithms vs LP or MIP

Read file lines into shell line separated by space

What should come first--characters or plot?

Handling Disruptive Student on the Autistic Spectrum

Asymmetric table

Is MOSFET active device?

Showing that the limit of non-eigenvector goes to infinity

Why do all fields in a QFT transform like *irreducible* representations of some group?

Did anyone try to find the little box that held Professor Moriarty and his wife after the crash?

How can I unambiguously ask for a new user's "Display Name"?

Numbers Decrease while Letters Increase

How to prevent clipped screen edges on my TV, HDMI-connected?

How to handle torpor?

Very slow boot time and poor perfomance

Could George I (of Great Britain) speak English?

Was there ever a treaty between 2 entities with significantly different translations to the detriment of one party?

How do I prevent other wifi networks from showing up on my computer?

Would the Republic of Ireland and Northern Ireland be interested in reuniting?

What verb is かまされる?

Are there any elected officials in the U.S. who are not legislators, judges, or constitutional officers?

Where was Carl Sagan working on a plan to detonate a nuke on the Moon? Where was he applying when he leaked it?

Is "The life is beautiful" incorrect or just very non-idiomatic?

Uri tokenizer as a simple state machine



How to add a CMS Block via XML layout update in Magento 2?


CMS XML Handles for Layout UpdatesHow can i rewrite TierPrice Block in Magento2convert widget block codes to phtml and xml layoutHow to add left sidebar to CMS pages?How do I add a css class to a CMS static block?magento 2 captcha not rendering if I override layout xmlHow to create a cms block with existing block content using widget in Magento 2?Add CMS Block to Sidebar in whole magento 2 siteHow insert static block all CMS page sidebar left sidebar Magento 2.x?Magento 2 : hide sidebar on mobile view






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















In order to create custom sidebar menus for my CMS pages in Magento 1, I used to be able to create a static block, and then use a widget to place it on all CMS pages that had a 2 column layout with left bar. That option is not available in Magento 2.



So, for Magento 2, I created a block called "guidenav", and I want it to appear on certain CMS pages, and for those CMS pages I can use this code in Layout Update XML:



<referenceContainer name="sidebar.additional">
<block class="MagentoCmsBlockBlock" name="guidenav">
<arguments>
<argument name="block_id" xsi:type="string">guidenav</argument>
</arguments>
</block>
</referenceContainer>


The block isn't showing up. Any ideas?










share|improve this question


























  • In Magento 2 also you can create a cms block for guidenav and use a widget to place it on all CMS pages.

    – Sejal Shah
    Jul 27 '17 at 5:16

















1















In order to create custom sidebar menus for my CMS pages in Magento 1, I used to be able to create a static block, and then use a widget to place it on all CMS pages that had a 2 column layout with left bar. That option is not available in Magento 2.



So, for Magento 2, I created a block called "guidenav", and I want it to appear on certain CMS pages, and for those CMS pages I can use this code in Layout Update XML:



<referenceContainer name="sidebar.additional">
<block class="MagentoCmsBlockBlock" name="guidenav">
<arguments>
<argument name="block_id" xsi:type="string">guidenav</argument>
</arguments>
</block>
</referenceContainer>


The block isn't showing up. Any ideas?










share|improve this question


























  • In Magento 2 also you can create a cms block for guidenav and use a widget to place it on all CMS pages.

    – Sejal Shah
    Jul 27 '17 at 5:16













1












1








1








In order to create custom sidebar menus for my CMS pages in Magento 1, I used to be able to create a static block, and then use a widget to place it on all CMS pages that had a 2 column layout with left bar. That option is not available in Magento 2.



So, for Magento 2, I created a block called "guidenav", and I want it to appear on certain CMS pages, and for those CMS pages I can use this code in Layout Update XML:



<referenceContainer name="sidebar.additional">
<block class="MagentoCmsBlockBlock" name="guidenav">
<arguments>
<argument name="block_id" xsi:type="string">guidenav</argument>
</arguments>
</block>
</referenceContainer>


The block isn't showing up. Any ideas?










share|improve this question
















In order to create custom sidebar menus for my CMS pages in Magento 1, I used to be able to create a static block, and then use a widget to place it on all CMS pages that had a 2 column layout with left bar. That option is not available in Magento 2.



So, for Magento 2, I created a block called "guidenav", and I want it to appear on certain CMS pages, and for those CMS pages I can use this code in Layout Update XML:



<referenceContainer name="sidebar.additional">
<block class="MagentoCmsBlockBlock" name="guidenav">
<arguments>
<argument name="block_id" xsi:type="string">guidenav</argument>
</arguments>
</block>
</referenceContainer>


The block isn't showing up. Any ideas?







magento2 layout blocks cms-block






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Aug 12 at 21:26









Rafael Corrêa Gomes

5,1602 gold badges37 silver badges72 bronze badges




5,1602 gold badges37 silver badges72 bronze badges










asked Jul 26 '17 at 21:06









styzzzstyzzz

3782 gold badges5 silver badges19 bronze badges




3782 gold badges5 silver badges19 bronze badges















  • In Magento 2 also you can create a cms block for guidenav and use a widget to place it on all CMS pages.

    – Sejal Shah
    Jul 27 '17 at 5:16

















  • In Magento 2 also you can create a cms block for guidenav and use a widget to place it on all CMS pages.

    – Sejal Shah
    Jul 27 '17 at 5:16
















In Magento 2 also you can create a cms block for guidenav and use a widget to place it on all CMS pages.

– Sejal Shah
Jul 27 '17 at 5:16





In Magento 2 also you can create a cms block for guidenav and use a widget to place it on all CMS pages.

– Sejal Shah
Jul 27 '17 at 5:16










1 Answer
1






active

oldest

votes


















0















I found the solution in case this will help anyone. In Magento 2, if you want to create a left side bar navigation, (and remove wishlist and compare), you need the following code in the CMS Page Layout Update XML (I dont like editing files if I dont have to, thats why I like sysing Layout Update XML). My block is called "guidenav" that calls the menu.



<referenceContainer name="sidebar.additional">
<referenceBlock name="catalog.compare.sidebar" remove="true"/>
<referenceBlock name="wishlist_sidebar" remove="true" />
<referenceBlock name="sale.reorder.sidebar" remove="true" />
<block class="MagentoCmsBlockBlock" name="guidenav">
<arguments>
<argument name="block_id" xsi:type="string">promo</argument>
</arguments>
</block>
</referenceContainer>





share|improve this answer





























    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%2f186670%2fhow-to-add-a-cms-block-via-xml-layout-update-in-magento-2%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















    I found the solution in case this will help anyone. In Magento 2, if you want to create a left side bar navigation, (and remove wishlist and compare), you need the following code in the CMS Page Layout Update XML (I dont like editing files if I dont have to, thats why I like sysing Layout Update XML). My block is called "guidenav" that calls the menu.



    <referenceContainer name="sidebar.additional">
    <referenceBlock name="catalog.compare.sidebar" remove="true"/>
    <referenceBlock name="wishlist_sidebar" remove="true" />
    <referenceBlock name="sale.reorder.sidebar" remove="true" />
    <block class="MagentoCmsBlockBlock" name="guidenav">
    <arguments>
    <argument name="block_id" xsi:type="string">promo</argument>
    </arguments>
    </block>
    </referenceContainer>





    share|improve this answer































      0















      I found the solution in case this will help anyone. In Magento 2, if you want to create a left side bar navigation, (and remove wishlist and compare), you need the following code in the CMS Page Layout Update XML (I dont like editing files if I dont have to, thats why I like sysing Layout Update XML). My block is called "guidenav" that calls the menu.



      <referenceContainer name="sidebar.additional">
      <referenceBlock name="catalog.compare.sidebar" remove="true"/>
      <referenceBlock name="wishlist_sidebar" remove="true" />
      <referenceBlock name="sale.reorder.sidebar" remove="true" />
      <block class="MagentoCmsBlockBlock" name="guidenav">
      <arguments>
      <argument name="block_id" xsi:type="string">promo</argument>
      </arguments>
      </block>
      </referenceContainer>





      share|improve this answer





























        0














        0










        0









        I found the solution in case this will help anyone. In Magento 2, if you want to create a left side bar navigation, (and remove wishlist and compare), you need the following code in the CMS Page Layout Update XML (I dont like editing files if I dont have to, thats why I like sysing Layout Update XML). My block is called "guidenav" that calls the menu.



        <referenceContainer name="sidebar.additional">
        <referenceBlock name="catalog.compare.sidebar" remove="true"/>
        <referenceBlock name="wishlist_sidebar" remove="true" />
        <referenceBlock name="sale.reorder.sidebar" remove="true" />
        <block class="MagentoCmsBlockBlock" name="guidenav">
        <arguments>
        <argument name="block_id" xsi:type="string">promo</argument>
        </arguments>
        </block>
        </referenceContainer>





        share|improve this answer















        I found the solution in case this will help anyone. In Magento 2, if you want to create a left side bar navigation, (and remove wishlist and compare), you need the following code in the CMS Page Layout Update XML (I dont like editing files if I dont have to, thats why I like sysing Layout Update XML). My block is called "guidenav" that calls the menu.



        <referenceContainer name="sidebar.additional">
        <referenceBlock name="catalog.compare.sidebar" remove="true"/>
        <referenceBlock name="wishlist_sidebar" remove="true" />
        <referenceBlock name="sale.reorder.sidebar" remove="true" />
        <block class="MagentoCmsBlockBlock" name="guidenav">
        <arguments>
        <argument name="block_id" xsi:type="string">promo</argument>
        </arguments>
        </block>
        </referenceContainer>






        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Dec 5 '17 at 20:14









        tesar.hk

        306 bronze badges




        306 bronze badges










        answered Jul 27 '17 at 13:51









        styzzzstyzzz

        3782 gold badges5 silver badges19 bronze badges




        3782 gold badges5 silver badges19 bronze badges






























            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%2f186670%2fhow-to-add-a-cms-block-via-xml-layout-update-in-magento-2%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

            Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

            Circuit construction for execution of conditional statements using least significant bitHow are two different registers being used as “control”?How exactly is the stated composite state of the two registers being produced using the $R_zz$ controlled rotations?Efficiently performing controlled rotations in HHLWould this quantum algorithm implementation work?How to prepare a superposed states of odd integers from $1$ to $sqrtN$?Why is this implementation of the order finding algorithm not working?Circuit construction for Hamiltonian simulationHow can I invert the least significant bit of a certain term of a superposed state?Implementing an oracleImplementing a controlled sum operation

            Magento 2 “No Payment Methods” in Admin New OrderHow to integrate Paypal Express Checkout with the Magento APIMagento 1.5 - Sales > Order > edit order and shipping methods disappearAuto Invoice Check/Money Order Payment methodAdd more simple payment methods?Shipping methods not showingWhat should I do to change payment methods if changing the configuration has no effects?1.9 - No Payment Methods showing upMy Payment Methods not Showing for downloadable/virtual product when checkout?Magento2 API to access internal payment methodHow to call an existing payment methods in the registration form?