I create static block with reference name 'seller_registration_form' from Magento 2 backend which loaded in home page like this:
Now i want to insert additional content from my module, so i created cms_index_index.xml:
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<referenceBlock name="seller_registration_form">
<block class="Test\Customlayout\Block\Sellerform" name="sellerform" template="Test_Customlayout::sellerform.phtml"/>
</referenceBlock>
</page>
but the phtml file never loaded in home page, i already make sure the block file in correct place and the phtml inside view/frontend/templates folder
Best Answer
You didn't place your
<referenceBlock>
inside<body></body>
. In Layout file types from official document:Also in same official document:
So in your
cms_index_index.xml
, you should embed<referenceBlock>
with<body>
. So that: