当几个drupal模块实现MODULENAME_template_preprocess时,它们的执行顺序是什么?
我问这个问题是因为这对于实名问题很重要,它让我思考如何避免此类问题冲突。
I'm asking because it mattered for a realname issue and it made me think of how to avoid these kind of conflicts.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
模块的调用顺序相同:根据其权重。 (在数据库中定义,请参阅“系统”表。)
如果两个模块共享相同的权重,则根据名称调用它们,按字母顺序排列。
In the same order that module are called : according to their weight. (defined in the database, see 'system' table.)
And if two module share the same weight, then they are called according to their name, alphabetically ordered.
因此请注意,
最后一个模块所做的更改
将得到反映。如果您想更改模块的顺序,答案是 Util,请注意,此模块还执行其他操作实用程序也很方便。
So do note that the
changes made by the last module will
be reflected.And if you want to change the order of the modules, the answer is Util, mind you this module does other utilities which come handy as well.