jet_dong Posted February 9, 2010 Share Posted February 9, 2010 Hi,大家好。一、我修改了prestashop 默认的 editorial 模块重新命名为:peditorial.php, 关键修改两处: ①function install() { if (!parent::install()) return false; return $this->registerHook('myPage'); }② function hookmyPage($params){ ..... }二、修改了header.php$smarty->assign(array( 'HOOK_HEADER' => Module::hookExec('header'), 'HOOK_LEFT_COLUMN' => Module::hookExec('leftColumn'),'HOOK_MYPAGE' => Module::hookExec('myPage'), 'HOOK_TOP' => Module::hookExec('top'), 'static_token' => Tools::getToken(false), 'token' => Tools::getToken(), 'priceDisplayPrecision' => _PS_PRICE_DISPLAY_PRECISION_, 'content_only' => intval(Tools::getValue('content_only'))));成功安装该模块。三、自定义的页面: productsss.tpl 内容如下: {include file=$tpl_dir./breadcrumb.tpl} <!-- Left --> {$HOOK_LEFT_COLUMN} {$HOOK_LEFT_COLUMN}{$HOOK_myPage} 四、然后运行相关的页面, 无法显示{$HOOK_myPage} 的内容,{$HOOK_LEFT_COLUMN}显示正常。谢谢,请大家不吝赐教。。。 Link to comment Share on other sites More sharing options...
21846657 Posted February 11, 2010 Share Posted February 11, 2010 看看这个帖子,也许会有帮助。 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now