diff --git a/lib/page.php b/lib/page.php index db2c600..8cbf23b 100644 --- a/lib/page.php +++ b/lib/page.php @@ -122,6 +122,8 @@ function renderPage($page_name = null, $site_name = null): array $page_title = $routerConfig['site_prefix'] . " " . $site_title . " " . $page_title; + $page = str_replace("__TEMPLATE_PAGE_TITLE__", $page_title, $page); + return [ "PageContent" => $page, "PageName" => $page_name, @@ -213,7 +215,7 @@ function getPage($site_name_in = null, $page_name_in = null): string $out = inlineLocalStylesFromHref($out); $out = inlineScriptFromSrc($out); } - return str_replace("__TEMPLATE_PAGE_TITLE__", $page_title, $out); + return $out; } function getPageEndpoint($page_name, $site_name) :array