Ant Petiot Posted March 5, 2017 Share Posted March 5, 2017 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.tplat 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 More sharing options...
Xpert-Idea Posted March 6, 2017 Share Posted March 6, 2017 public function initContent() { // your custom code here ... $this->setTemplate('Mypage'); } do you used $this->setTemplate('Mypage') . Please check.. 1 Link to comment Share on other sites More sharing options...
Ant Petiot Posted March 6, 2017 Author Share Posted March 6, 2017 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now