2014-12-06 39 views
0

我想打電話從模板這樣的鉤子:的Prestashop模板勾調用

{hook h='displayCustom' mod='customcontent'} 

我創建了一個新的鉤和添加方法到模塊是這樣的:

$this->registerHook('displayCustom'); 

    public function hookDisplayCustom($params) { 

     return $this->display(__FILE__, 'customcontent.tpl'); 

    } 

我看到模塊觸發但沒有輸出。我該如何解決它?Prestashop 1.6,customcontent.tpl內容簡單文本'TEST'。

回答

1

如果smbdy會遇到麻煩。 可能的解決方案是: 管理面板中有一個觸發器關閉除本地以外的所有其他模塊。 路徑是:管理面板 - >配置 - >性能 - >關閉所有非本地模塊。它必須關閉。