This commit is contained in:
2024-02-02 12:41:02 +01:00
parent 7f6afabab2
commit 9ad8af8c6f
3 changed files with 9 additions and 4 deletions

View File

@@ -19,9 +19,14 @@ function generateNavigation(): string
$site_name = str_replace("_", " ", $site_dir);
$site_subdomain = $site_dir;
if ($site_name == "apex") {
$site_subdomain = "";
}
$site_name = ucfirst($site_name);
$site_location = $routerConfig["protocol"] . $site_dir . "." . $routerRequest["domain"] . "." . $routerRequest["tld"] . "/" . $routerConfig["default_page"];
$site_location = $routerConfig["protocol"] . $site_subdomain . "." . $routerRequest["domain"] . "." . $routerRequest["tld"] . "/" . $routerConfig["default_page"];
if ($routerRequest["subdomain"] == $site_dir) {
//this is the current page
@@ -41,7 +46,7 @@ function generateNavigation(): string
$page_class = "class=\"navpage_link active\"";
}
$page_location = $routerConfig["protocol"] . $site_dir . "." . $routerRequest["domain"] . "." . $routerRequest["tld"] . "/" . $page_dir;
$page_location = $routerConfig["protocol"] . $site_subdomain . "." . $routerRequest["domain"] . "." . $routerRequest["tld"] . "/" . $page_dir;
$page_name = str_replace("_", " ", $page_dir);
$page_name = explode(".", $page_name)[0];