Templates 从控制器Prestashop重写模板
谁能给我解释一下getOverrideTemplate方法吗? 如果是子类别,我不知道如何在类别控制器中覆盖它以使用新模板Templates 从控制器Prestashop重写模板,templates,controller,overriding,prestashop,Templates,Controller,Overriding,Prestashop,谁能给我解释一下getOverrideTemplate方法吗? 如果是子类别,我不知道如何在类别控制器中覆盖它以使用新模板 谢谢。我将在Catory tpl或controller中使用类别级别的深度。 例: public function initContent() { parent::initContent(); if($this->category->level_depth ==2) $this->setTempla
谢谢。我将在Catory tpl或controller中使用类别级别的深度。 例:
public function initContent()
{
parent::initContent();
if($this->category->level_depth ==2)
$this->setTemplate(_PS_THEME_DIR_.'category.tpl');
$this->setTemplate(_PS_THEME_DIR_.'category2.tpl');