Fix thanks and error page routing for both languages
All checks were successful
Deploy / Deploy to Production (push) Successful in 7s
All checks were successful
Deploy / Deploy to Production (push) Successful in 7s
- Add dedicated routes for /thanks, /error, /en/thanks, and /en/error - Create missing error.en.txt content file - Add title to error.fr.txt Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
7575e5adbc
commit
4b7062e0bd
3 changed files with 48 additions and 1 deletions
5
content/error/error.en.txt
Normal file
5
content/error/error.en.txt
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
Title: Error
|
||||
|
||||
----
|
||||
|
||||
Template: default
|
||||
|
|
@ -1 +1,5 @@
|
|||
Uuid: kcrqkszqasludg2h
|
||||
Title: Erreur
|
||||
|
||||
----
|
||||
|
||||
Uuid: kcrqkszqasludg2h
|
||||
|
|
|
|||
|
|
@ -37,6 +37,44 @@ return [
|
|||
return null;
|
||||
}
|
||||
],
|
||||
// English thanks page
|
||||
[
|
||||
'pattern' => 'en/thanks',
|
||||
'action' => function() {
|
||||
$thanks = page('thanks');
|
||||
if ($thanks) {
|
||||
site()->visit($thanks, 'en');
|
||||
return $thanks;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
],
|
||||
// English error page
|
||||
[
|
||||
'pattern' => 'en/error',
|
||||
'action' => function() {
|
||||
$error = page('error');
|
||||
if ($error) {
|
||||
site()->visit($error, 'en');
|
||||
return $error;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
],
|
||||
// French thanks page
|
||||
[
|
||||
'pattern' => 'thanks',
|
||||
'action' => function() {
|
||||
return page('thanks');
|
||||
}
|
||||
],
|
||||
// French error page
|
||||
[
|
||||
'pattern' => 'error',
|
||||
'action' => function() {
|
||||
return page('error');
|
||||
}
|
||||
],
|
||||
// French products (default)
|
||||
[
|
||||
'pattern' => '(:any)',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue