【问题标题】:Override Template from Controller Prestashop从控制器 Prestashop 覆盖模板
【发布时间】:2013-12-30 07:34:18
【问题描述】:

谁能解释一下 getOverrideTemplate 方法? 如果它是子类别,我不知道如何在类别控制器中覆盖它以使用新模板。

谢谢。

【问题讨论】:

    标签: templates controller overriding prestashop


    【解决方案1】:

    我将在类别 tpl 或控制器中使用类别 level_depth。 例如:

    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');
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-03-28
      • 1970-01-01
      • 2023-03-22
      • 1970-01-01
      • 1970-01-01
      • 2011-12-05
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多