[*] classes : new module architecture

This commit is contained in:
rMalie
2012-01-31 16:57:19 +00:00
parent 62f105ae6e
commit 4f7b3d4550
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);