[*] classes : new module architecture

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@12872 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2012-01-31 16:57:19 +00:00
parent 03038c4aed
commit 9739089c32
71 changed files with 815 additions and 622 deletions
+6 -2
View File
@@ -79,8 +79,12 @@ class HelperCore
*/
public function createTemplate($tpl_name)
{
// Overrides exists?
if ($this->override_folder && file_exists($this->context->smarty->getTemplateDir(0).'controllers/'.$this->override_folder.$tpl_name))
if ($this->context->controller instanceof ModuleAdminController)
{
if ($this->override_folder && file_exists($this->context->controller->getTemplatePath().$this->override_folder.$tpl_name))
return $this->context->smarty->createTemplate($this->context->controller->getTemplatePath().$this->override_folder.$tpl_name);
}
else if ($this->override_folder && file_exists($this->context->smarty->getTemplateDir(0).'controllers/'.$this->override_folder.$tpl_name))
return $this->context->smarty->createTemplate('controllers/'.$this->override_folder.$tpl_name);
return $this->context->smarty->createTemplate($this->base_folder.$tpl_name);