Skip to content

Commit

Permalink
Added home page path prefixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
kepol committed Feb 29, 2024
1 parent 7d7c95c commit eb751c8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Utility.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,15 @@ public static function getSpecialPages() {
'/_quant403',
];

// Add translations of home page.
if (self::usesLanguagePathPrefixes()) {
if ($prefixes = \Drupal::config('language.negotiation')->get('url.prefixes')) {
foreach ($prefixes as $prefix) {
$pages[] = "/{$prefix}";
}
}
}

$validator = \Drupal::service('path.validator');
foreach ($pages as $index => $page) {
// Remove any pages that don't exist.
Expand Down

0 comments on commit eb751c8

Please sign in to comment.