Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions localgov_subsites.install
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,22 @@ function localgov_subsites_install($is_syncing) {
if (\Drupal::moduleHandler()->moduleExists('localgov_services_navigation')) {
localgov_subsites_optional_fields_settings();
}

// Install default config for simple_sitemap, as this does not appear to work
// in the config/optional folder.
// Discussed on https://www.drupal.org/project/simple_sitemap/issues/3156080
if (\Drupal::moduleHandler()->moduleExists('simple_sitemap')) {
$generator = \Drupal::service('simple_sitemap.entity_manager');
$generator->setBundleSettings('node', 'localgov_subsites_overview', [
'index' => TRUE,
// Cast as string to ensure the value is properly set.
'priority' => '1.0',
]);
$generator->setBundleSettings('node', 'localgov_subsites_page', [
'index' => TRUE,
'priority' => '0.5',
]);
}
}

/**
Expand Down
Loading