{{block class="Magento\Framework\View\Element\Template" name="test_file" template="Vendor_Module::html/test.phtml"}}
Problem Solved? Please Click on 'Accept as Solution!'
Need to create one .phtml file and call in cms page because of the frontend view and HTML check.
Hello @Ashish_k_php ,
Please paste this code in your CMS page to get that block inside that CMS :
{{block class="Magento\Framework\View\Element\Template" template="[VendorName]_[ModuleName]::[YourTemplateFileLocation].phtml"}}
change block class if your phtml file is dependent on any class.
Hi @Ashish_k_php ,
You can create phtml file in luma theme in one of the module directory.
Example Magento_Theme folder have home_banner.phtml file.
{{block class="Magento\Framework\View\Element\Template" name="custom-content" template="Magento_Theme::home_banner.phtml"}}
You can change the block class if your phtml is
Dependent on some block class.
Clear the magento cache.
Hope this helps you!
Problem Solved! Click Kudos & Accept as Solution!
Try to add new phtml file withing your custom module:
app/design/frontend/{vendor}/{theme}/Vendor_Module/templates/{file.phtml}
And call with in cms page using below code:
{{block class="Magento\Framework\View\Element\Template" name="test_file" template="Vendor_Module::html/test.phtml"}}