Home ›
Set a module weight using its .install fileSet a module weight using its .install file
Submitted by Benjamin Melançon on June 23, 2008 - 7:35am
in placement.install
<?php
function placement_install() {
db_query("UPDATE {system} SET weight = 10 WHERE name = 'placement'");
}
?>
The query is the same in both MySQL and PostgreSQL so for these databases (which are what Drupal core supports) this does not need to be placed in a switch statement.
Resolution
Searched words:
module weight setting
make module run after other modules
change the weight of your module
Comments
Post new comment