0

How can I add a template file located under: app/code/design/Smartwave/porto_child/Qx/Verkoopje/templates/laptop.phtml

Into a cms page?

I use the following code but it does not work

{{block class="Magento\Framework\View\Element\Template" name="verkoopje" template="Qx_Verkoopje::laptop.phtml"}}

1 Answer 1

1

Syntax to call Block-Template in CMS page:

{{block class="Magento\Framework\View\Element\Template" template="[VendorName]_[ModuleName]::[TemplateFilePath].phtml"}}

Forntend template file path:

app/code/[VendorName]/[ModuleName]/view/frontend/templates/file.phtml
3
  • Hi, thanks for awnsering, can you write out the templatepath location as in your example? Dec 20, 2017 at 20:03
  • Hi, I've already mentioned template path on above answer (i.e. app/code/Qx/Verkoopje/view/frontend/templates/file.phtml) I think you're working with Porto theme.
    – Pratik Oza
    Dec 20, 2017 at 20:13
  • Yes to be used in the widget code. DO I need to register the block? Dec 20, 2017 at 20:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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