Jump to content

Referencing a tpl file on the configuration page in PS1.7.5


Recommended Posts

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

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

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...