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