2

I am trying to add a new phtml template file (in my child theme) of a custom module (not mine).

Here is the block :

{{block class="Sm\FilterProducts\Block\FilterProducts" template="Sm_FilterProducts::default-grid-column-id16.phtml" title_module="New product"  product_source="news_products" product_limitation="8"}}

I changed the template to: Magento_Theme::mytemplate.phtml without success.

Edit for more information :

I have created a mytemplate.phtml in the folder app of my theme :

app/design/frontend/hexa/Ztheme/template/page/html/sm_template.phtml
2
  • Cleared block_html and full_page caches? Commented Nov 10, 2017 at 10:31
  • I still have Invalid template file: 'Magento_Theme::sm_template.phtml' in module: 'Sm_FilterProducts' block's name: 'filterproducts_0'
    – David N
    Commented Nov 10, 2017 at 10:43

2 Answers 2

2
app/design/frontend/hexa/Ztheme/Magento_Theme/templates/page/html/sm_template.phtml

for

Magento_Theme::page/html/mytemplate.phtml

and For

 Sm_FilterProducts::default-grid-column-id16.phtml

you must create an file in this folder

app/design/frontend/hexa/Ztheme/Sm_FilterProducts/templates/default-grid-column-id16.phtml
1
  • Thanks you. I was not using the right directory.
    – David N
    Commented Nov 10, 2017 at 12:44
1

Try

Magento_Theme::html/sm_template.phtml

in your block template.

Hope it helps!!

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.