Jump to content

Creating new page got "No template found for" (PS 1.7)


Recommended Posts

I want to create a new page on prestashop 1.7.0.4.

 

I created  root/controllers/front/MypageController.php

 

I also created root/themes/mytheme/templates/Mypage.tpl

 

I created the page on backend.

 

When I visit

http://myshop.com/index.php?controller=mypage

 

I get this error:

 

No template found for /home/myshop/www/themes/mytheme/templates/Mypage.tpl
at line 68 in file classes/Smarty/TemplateFinder.php

 

but the file "/home/myshop/www/themes/mytheme/templates/Mypage.tpl" EXISTS. The file is in that path.

 

I don't understand what I'm missing... please help.

Link to comment
Share on other sites

Thanks Xpert-Idea!

 

I had this line:

$this->setTemplate(_PS_THEME_DIR_.'templates/Mypage.tpl');

 

as you said, I changed with:

$this->setTemplate('Mypage');

 

now works ok!

 

( also works with $this->setTemplate('Mypage.tpl'); )

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...