Fix English homepage routing
All checks were successful
Deploy / Deploy to Production (push) Successful in 6s
All checks were successful
Deploy / Deploy to Production (push) Successful in 6s
Add dedicated route for /en to display home page in English using Kirby's multilingual system. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
9b4bd4b731
commit
7575e5adbc
1 changed files with 12 additions and 0 deletions
|
|
@ -25,6 +25,18 @@ return [
|
|||
);
|
||||
}
|
||||
],
|
||||
// English homepage
|
||||
[
|
||||
'pattern' => 'en',
|
||||
'action' => function() {
|
||||
$home = page('home');
|
||||
if ($home) {
|
||||
site()->visit($home, 'en');
|
||||
return $home;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
],
|
||||
// French products (default)
|
||||
[
|
||||
'pattern' => '(:any)',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue