[-] Classes : ModuleFrontController updated. Thank you @codeurWeb

This commit is contained in:
Francois Gaillard
2013-08-05 16:25:52 +02:00
parent 07181a37f5
commit 176c6a8767

View File

@@ -55,6 +55,8 @@ class ModuleFrontControllerCore extends FrontController
{
if (Tools::file_exists_cache(_PS_THEME_DIR_.'modules/'.$this->module->name.'/'.$template))
$this->template = _PS_THEME_DIR_.'modules/'.$this->module->name.'/'.$template;
elseif (Tools::file_exists_cache(_PS_THEME_DIR_.'modules/'.$this->module->name.'/views/templates/front/'.$template))
$this->template = _PS_THEME_DIR_.'modules/'.$this->module->name.'/views/templates/front/'.$template;
elseif (Tools::file_exists_cache($this->getTemplatePath().$template))
$this->template = $this->getTemplatePath().$template;
else
@@ -68,8 +70,6 @@ class ModuleFrontControllerCore extends FrontController
*/
public function getTemplatePath()
{
if (file_exists(_PS_THEME_DIR_.'modules/'.$this->module->name.'/views/templates/front/'.$this->template))
return _PS_THEME_DIR_.'modules/'.$this->module->name.'/views/templates/front/'.$this->template;
return _PS_MODULE_DIR_.$this->module->name.'/views/templates/front/';
}
}