开发者

When several drupal modules implement MODULENAME_template_preprocess, what is the order they are executed?

开发者 https://www.devze.com 2023-02-17 13:46 出处:网络
I\'m asking because it mattered for a rea开发者_运维技巧lname issue and it made me think of how to avoid these kind of conflicts.In the same order that module are called : according to their weight. (

I'm asking because it mattered for a rea开发者_运维技巧lname issue and it made me think of how to avoid these kind of conflicts.


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.


Drupal assigns each module a weight. For most operations involving any module that defines a particular hook, the modules are invoked in order first by weight, then by name.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消