diff --git a/content/error/error.en.txt b/content/error/error.en.txt new file mode 100644 index 0000000..e7a7a4d --- /dev/null +++ b/content/error/error.en.txt @@ -0,0 +1,5 @@ +Title: Error + +---- + +Template: default diff --git a/content/error/error.fr.txt b/content/error/error.fr.txt index 1301277..986fe1a 100644 --- a/content/error/error.fr.txt +++ b/content/error/error.fr.txt @@ -1 +1,5 @@ -Uuid: kcrqkszqasludg2h \ No newline at end of file +Title: Erreur + +---- + +Uuid: kcrqkszqasludg2h diff --git a/site/config/config.php b/site/config/config.php index 3da6162..5023f17 100644 --- a/site/config/config.php +++ b/site/config/config.php @@ -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)',