0

How to call a phtml file in cms page. my phtml file is located under the path \app\code\Testing\Helloworld\view\frontend\templates\helloworld.phtml.Thank you in advance

1
{{block class="Magento\Framework\View\Element\Template" template="Testing_Helloworld::helloworld.phtml"}}

you can use Magento\Framework\View\Element\Template block class to call custom phtml files with out define block class.

1

Try below code in cms page, If you want to call phtml with in cms page.

{{block class="Magento\Framework\View\Element\Template" template="Testing_Helloworld::helloworld.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.