From 48cfe2744bb159c57a602b86f6d03987a62a8ab4 Mon Sep 17 00:00:00 2001 From: bruno Date: Thu, 29 Feb 2024 09:32:59 +0100 Subject: [PATCH] Fix page title --- lib/page.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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