How can i call phtml file into cms page by using widget?
-
13-12-2019 - |
Question
I have a phtml file mw/news/slider.phtml
.
I would like to use this file at cms page.
So how can i do this by using widget ?
Solution
You can use the following code in the content area of the CMS page:
{{block type="core/template" template="mw/news/slider.phtml"}}
If needed you can replace 'core/template' with another custom block type.
You can't use a custom .phtml template when adding a widget, so inserting the block directly is the right way to do it.
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange