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
Coen Ponsen
2532 silver badges16 bronze badges
1 Answer 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
Pratik Oza
4,00212 silver badges17 bronze badges
-
Hi, thanks for awnsering, can you write out the templatepath location as in your example?Coen Ponsen– Coen Ponsen2017年12月20日 20:03:41 +00:00Commented 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– Pratik Oza2017年12月20日 20:13:55 +00:00Commented Dec 20, 2017 at 20:13
-
Yes to be used in the widget code. DO I need to register the block?Coen Ponsen– Coen Ponsen2017年12月20日 20:20:37 +00:00Commented Dec 20, 2017 at 20:20
default