I have a static block that I want to load a .phtml file from.

I used this code after looking through stackoverflow,

{{block class="Magento\Framework\View\Element\Template" name="custom_page" template="Magento_Theme::html/custompage.phtml"}}

My .phtml file is at,


I get a blank white page with no errors in log file, what did I do wrong?


The error was in my .phtml file, it was actually loading the .phtml file but then the .phtml file was causing an error.


Try this

{{block class="<vendor_name>\<module_name>\Block\<module_name>" name="<your_block_name>" template="<vendor_name>_<module_name>::<template_directory>/filename.phtml"}}

In your case it is look like

{{block class="Ashore\Faq\Block\Faq\Index" name="Faq" template="Ashore_Faq::faq/index.phtml"}}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.