Jump to content

请教head.tpl里{$HOOK_TOP}是怎么样调用modules里的各个模板的


Recommended Posts

请教下在head.tpl里的{$HOOK_TOP}是怎么调用modules里面的各个模板的,比如说顺序,默认是首先显示搜索这一块代码的,假如我想把head部分的模拟调整一下顺序,请问要怎么做?小弟是菜鸟,请各位大吓帮帮忙,谢谢。

head.tpl代码:

<!-- Header -->


{$shop_name|escape:'htmlall':'UTF-8'}



{$HOOK_TOP}

Share this post


Link to post
Share on other sites

在安装时,模块会通过一个或若干个function(s),register某个或某些hook(s)。你可以通过DB里的表格ps_hook了解有哪些hooks,以及所对应的位置;甚至定制自己的hook。在tpl里,调整hooks的位置是可以的,但修改为其他hooks会产生错误。

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More