diff --git a/lib/navigation.php b/lib/navigation.php index d8a5d21..0d03292 100644 --- a/lib/navigation.php +++ b/lib/navigation.php @@ -20,6 +20,10 @@ function generateNavigation(): string $site_name = str_replace("_", " ", $site_dir); if ($site_name == "global") { $site_name = "misc"; + $site_subdomain = $routerConfig["default_site"]; + } + else{ + $site_subdomain = $site_dir; } if ($site_name == "smp") { @@ -28,7 +32,7 @@ function generateNavigation(): string $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