Skip to content
Snippets Groups Projects
Commit 818c5e15 authored by Ryan Szrama's avatar Ryan Szrama Committed by Ryan Szrama
Browse files

Issue #3364652 by rszrama: Only set the /frontpage when the content is created

parent fa991d41
Branches
No related tags found
No related merge requests found
......@@ -18,8 +18,14 @@ use Drupal\user\UserInterface;
* @see system_install()
*/
function commerce_kickstart_install() {
// Set front page to "node".
\Drupal::configFactory()->getEditable('system.site')->set('page.front', '/frontpage')->save(TRUE);
// Set front page to "node" by default or "frontpage" with commerce_demo.
if (\Drupal::service('module_handler')->moduleExists('commerce_demo')) {
$path = '/frontpage';
}
else {
$path = '/node';
}
\Drupal::configFactory()->getEditable('system.site')->set('page.front', $path)->save(TRUE);
// Allow visitor account creation with administrative approval.
$user_settings = \Drupal::configFactory()->getEditable('user.settings');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment