Always include nav.html

This commit is contained in:
2024-02-05 22:26:02 +01:00
parent 89d5cccc31
commit 2cade060cf
2 changed files with 5 additions and 5 deletions

View File

@@ -22,6 +22,7 @@ function generateNavigation(): string
global $routerConfig;
global $routerRequest;
$nav = file_get_contents($routerConfig["template_dir"] . "nav.html");
$site_dirs = array_diff(scandir($routerConfig["page_dir"]), array('.', '..'));
$nav_out = "";
@@ -92,7 +93,7 @@ function generateNavigation(): string
}
}
return $nav_out;
return str_replace("__NAV_PAGES__", $nav_out, $nav);
}
function getNavigationEndpoint() :array{