forked from Adleraci/adlerka.top
Fix page title
This commit is contained in:
parent
1650e852cd
commit
21e78d3ceb
@ -12,6 +12,7 @@
|
||||
'endpoint_dir' => 'endpoints/',
|
||||
'page_dir' => 'pages/',
|
||||
'protocol' => 'https://',
|
||||
'site_prefix' => 'Adlerka',
|
||||
'permissions' => [
|
||||
'logged_out' => 1,
|
||||
'logged_in_default' => 2,
|
||||
|
@ -40,6 +40,10 @@ function renderPage($page_name = null, $site_name = null): array
|
||||
$site_name = $routerRequest["site_name"];
|
||||
}
|
||||
|
||||
$site_title = str_replace("_", " ", $site_name);
|
||||
|
||||
$site_title = ucfirst($site_title);
|
||||
|
||||
if(!$page_name){
|
||||
$page_name = $routerRequest["page_name"];
|
||||
}
|
||||
@ -110,7 +114,7 @@ function renderPage($page_name = null, $site_name = null): array
|
||||
}
|
||||
|
||||
if(!empty($pageMetadata["parameters"]["page_title"])){
|
||||
$page_title = $pageMetadata["parameters"]["page_title"];
|
||||
$page_title = $routerConfig['site_prefix'] . " " . $site_title . " " . $pageMetadata["parameters"]["page_title"];
|
||||
}
|
||||
else{
|
||||
$page_title = $page_name;
|
||||
|
Loading…
Reference in New Issue
Block a user