Set the front page to /farm during site installation.

This commit is contained in:
Michael Stenta 2015-01-07 19:09:37 -05:00
parent 4991fe6812
commit 33a33d1ee0
1 changed files with 16 additions and 0 deletions

View File

@ -17,6 +17,13 @@ function farm_install_tasks($install_state) {
'run' => INSTALL_TASK_RUN_IF_NOT_COMPLETED,
'function' => 'farm_configure_themes',
);
$tasks['farm_configure_front'] = array(
'display_name' => st('Farm: configure front page'),
'display' => FALSE,
'type' => 'normal',
'run' => INSTALL_TASK_RUN_IF_NOT_COMPLETED,
'function' => 'farm_configure_front',
);
return $tasks;
}
@ -43,3 +50,12 @@ function farm_configure_themes() {
// Disable the default Bartik theme
theme_disable(array('bartik'));
}
/**
* Set the front page of the site.
*/
function farm_configure_front() {
// Set the front page to the farm dashboard provided by the farm_admin module.
variable_set('site_frontpage', 'farm');
}