0

我想在我的菜单元素中插入一个挂钩。

Store 是 prestashop 中的一个模块,它钩住右侧栏。

我想在我的菜单 elem 中加载 store 模块输出

blockcontact 模块钩子函数

public function hookDisplayRightColumn()
{
    global $smarty;

    $smarty->assign(array(
        'telnumber' => Configuration::get('blockcontact_telnumber'),
        'email' => Configuration::get('blockcontact_email')
    ));
    return $this->display(__FILE__, 'blockcontact.tpl');
}

我想通过一些在我的菜单元素中返回这个方法输出的方式来触发这个模块。

4

1 回答 1

0

您不能在模板文件中添加新钩子并使用 {hook h="[nameHook]" mod="[namemodule]"} 。

示例:{hook h="displayTop" mod="blocksearch"}- 此代码显示 blokseacrh 为 displayTop 挂钩生成的内容,您在哪里使用它

于 2014-11-26T16:52:33.397 回答