/app/design/frontend/Vendor/theme/
Magento_Cms
/layout/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">
<referenceContainer name="page.top">
<block class="Magento\Framework\View\Element\Template" name="home" template="Magento_Cms::html/home.phtml">
<arguments>
<argument name="section" xsi:type="string">homepage</argument>
<argument name="position" xsi:type="number">0</argument>
</arguments>
</block>
</referenceContainer>
</page>
Create .phtml file in
/app/design/frontend/Vendor/theme/
Magento_Cms
/templates/html/home.phtml
<?php echo $this->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('homepage-slider')->toHtml();?>
Magento 2 - How to call a custom phtml file in another phtml file, xml layout, static block and cms page?
http://stackoverflow.com/questions/34288366/magento-2-how-to-call-a-custom-phtml-file-in-another-phtml-file-xml-layout-s
Formula:
Magento 2 - How to call a custom phtml file in another phtml file, xml layout, static block and cms page?
http://stackoverflow.com/questions/34288366/magento-2-how-to-call-a-custom-phtml-file-in-another-phtml-file-xml-layout-s
Formula:
{{block class="[BlockClassFullName]" template="[VendorName]_[ModuleName]::[YoutTemplateFile.location].phtml"}}