Sickboards Posted Friday at 05:53 PM Share Posted Friday at 05:53 PM Hello I am trying to build a module and I ran into the following: I made an admin.tpl file in the module folder\views\templates\admin\ and when I reference it in 1.7.8 using: $this->setTemplate('admin.tpl'); it works fine but in 1.7.5 it keeps trying to resolve it to the admin/themes/default/template/admin.tpl which of course does not exist. How can I reference this in a way that it is clear for all version of Prestashop? Thanks in advance. Martijn Link to comment Share on other sites More sharing options...
ComGrafPL Posted Friday at 05:59 PM Share Posted Friday at 05:59 PM have you tried with full path instead i.e: $this->setTemplate($this->getTemplatePath('views/templates/admin/admin.tpl')); Link to comment Share on other sites More sharing options...
Sickboards Posted Friday at 06:05 PM Author Share Posted Friday at 06:05 PM 2 minutes ago, ComGrafPL said: have you tried with full path instead i.e: $this->setTemplate($this->getTemplatePath('views/templates/admin/admin.tpl')); Thank you for your suggestion, unfortunately it still does not resolve correctly, now it states: Unable to load template 'file:/home/****/****/admin/themes/default/template//home/***/***/modules/my_module/views/templates/admin/' so it almost correct I think, it just needs to be a seen as an absolute path. Link to comment Share on other sites More sharing options...
ComGrafPL Posted Friday at 06:07 PM Share Posted Friday at 06:07 PM What if: $this->setTemplate('module:my_module/views/templates/admin/admin.tpl'); Link to comment Share on other sites More sharing options...
Sickboards Posted Friday at 06:16 PM Author Share Posted Friday at 06:16 PM Then it will give: Unable to load template file:/home/***/***/admin/themes/default/template/module:my_module/views/templates/admin/admin.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