cancel
Showing results for 
Search instead for 
Did you mean: 

Layout Update XML field goes empty every time I fill it

Layout Update XML field goes empty every time I fill it

I am trying to add this code to the Layout Update XML field in Home page

<referenceContainer name="slide.showcase">
            <block class="Magento\Cms\Block\Block" name="home-slide15">
                <arguments>
                    <argument name="block_id" xsi:type="string">home-slide15</argument>
                </arguments>
            </block>
</referenceContainer>

But I found something strange,

Every time I add this code to Layout Update XML field and then save the page, when I check the Layout Update XML field again, I find it empty, it turns to empty as if no code was added.

what could be the problem of this??

2 REPLIES 2

Re: Layout Update XML field goes empty every time I fill it

Hi @mbussnsgmafa14,

 

Greetings!

 

You are placing this code in the wrong field. You just need to add this code to the layout.xml file.

Put this same code layout.xml in the directory of the block which you want to call. 

 

Hope this will help you to solve your problem. 

If not, feel free to contact us.

 

Solved?

Click KUDOS and accept as a solution.

Thank you!

Re: Layout Update XML field goes empty every time I fill it

Yes, I verified it as well. Adding codes to update xml files sometimes works, but if you add the code for your layout.xml file and the directory of the block you want to call, it will work without error. The same principles were used in my Tutuapp, Nox, and Movie hd layouts.