This commit is contained in:
Richard Mikloš 2024-01-20 20:01:41 +01:00
parent 4a5886df49
commit 1a598e6b27

@ -46,11 +46,7 @@ foreach($paths_to_check as $page_dir){
break;
}
}
ob_start();
include $page_file;
$page_data = ob_get_clean();
$page_data = preg_replace($page_regex, '', $page_data);
$page_data = include_ob($page_file);
$output = file_get_contents("$template_dir/skeleton.html");
$output = str_replace('<template name="navigation">', $nav, $output);
@ -69,6 +65,7 @@ $page_regex = '/<!--PAGENAME=(.*?)-->/s';
if(preg_match($page_regex, $page_data, $matches)){
$page_name = $matches[1];
$page_data = preg_replace($page_regex, '', $page_data);
}
else{
$page_name = ucfirst($page);