Jump to content

Connect controller to more than one template.


Premitium

Recommended Posts

I have an overwritten ProductController and have connected it with the product.tpl like so:

 

$this->setTemplate(_PS_THEME_DIR_.'product.tpl');

 

However, I've got a custom module that is in the modules folder and there is a template withing it, the path is like that:

 

www\prestashop\modules\WineSpecifications\views\templates\hook\specifications.tpl

 

so I need an array from the controller to be available in both the product.tpl and the specifications.tpl

 

I've tried to give an absolute path to the specifications.tpl like: 

 

$this->setTemplate(modules/WineSpecifications/views/templates/hook/specifications.tpl);

 

 

Any idea how I should do it?

 

Any help will be appreciated!

 

Thank you!

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