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
Searched words:
module weight setting
make module run after other modules
change the weight of your module
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
More like this
- Set weight of a Drupal module
- Drupal's Enable hook can be tucked away in the .install file
- Set higher minimum server environment requirements for a Drupal installation profile
- Using Drush to install or update to a particular tagged release of a module
- Use drupal_set_message with print_r to see the view code


Comments
Post new comment