14 Oct 2020 IN Magento

How to call phtml file in CMS static block in Magento 2

How To Call phtml File In CMS static Block In Magento 2?

Here we will learn how to add or call phtml file on any cms page. We can use block code to do this.

Login to Magento 2 admin panel then Open a CMS page and write the below block code in content section.

{{block class=”Magento\Framework\View\Element\Template” template=”Vendor_Module::templatefolder/file.phtml”}}

Do you want to share your interesting Magento/WordPress/Shopify project with us?