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"}}

asked Dec 20, 2017 at 19:38

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
answered Dec 20, 2017 at 19:58
3
  • Hi, thanks for awnsering, can you write out the templatepath location as in your example? Commented 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. Commented Dec 20, 2017 at 20:13
  • Yes to be used in the widget code. DO I need to register the block? Commented Dec 20, 2017 at 20:20

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.