2

I am facing issue with creating a block between header.container and main. so that I can put the banner over there. And I need the banner in home page only

please help me for the same.

  • actually where you want to Display banner section after Menu or Before Menu ? – Divyesh May 8 '18 at 10:36
4

I have tried and its working for me.

<referenceContainer name="page.wrapper">
        <container name="page.wrapper.second" as="page_wrapper_second" htmlTag="div" htmlClass="my-custom-div" before="main.content">
               <block class="Magento\Cms\Block\Block" name="your_banner_block">
                     <arguments>
                          <argument name="block_id" xsi:type="string">your_banner_block</argument>
                     </arguments>
               </block>
        </container>
</referenceContainer>

You have to place your banner block instead of "your_banner_block" block.

  • Thanks its working ..but i want the banner for home page only..but it is coming in all pages..help me to get in home page only as a banner – SUBBULAKSHMI G May 8 '18 at 12:22
  • i need the block with whole 100% width at the middle of the page...above product.info.details in individual product details page – SUBBULAKSHMI G May 10 '18 at 12:26
1

You can use Widget

  • On the Admin Panel
    Content > Elements > Widgets
  • In the upper-right corner of Widgets workplace, click on Add New Widget button.
  • In the Settings section:
    • Choose CMS Static Block type in the Type box.
    • Choose the current theme you are applying in the Design Theme.
    • Click Continue button.

enter image description here

Complete the Layout Updates enter image description here

0

I have found the answer ...that we should create the custom xml file for that ..and assign the custom xml to the home page from admin side..mention in the custom xml whatever we want and positions..then it will come

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.