Initialize route and raw_route, fix empty route as values

This commit is contained in:
Pierre Joye
2021-01-29 14:48:20 +07:00
parent a35b9b1279
commit cb2c9616d7

View File

@@ -271,7 +271,8 @@ class Page implements PageInterface
if ($exists) {
$aPage = new Page();
$aPage->init(new SplFileInfo($path), $languageExtension);
$aPage->route($this->route());
$aPage->rawRoute($this->rawRoute());
$route = $aPage->header()->routes['default'] ?? $aPage->rawRoute();
if (!$route) {
$route = $aPage->route();