Allow template pages

Checks if page exists in template directory and loads that page first instead of system/pages/
This allows users to make their own changes without modifying the original files for when doing updates.
This commit is contained in:
Lee 2020-12-28 16:22:41 +00:00
parent 64fe0062ee
commit c8443228fb

View File

@ -328,11 +328,15 @@ if($load_it)
)) . $content;
}
} else {
$file = SYSTEM . 'pages/' . $page . '.php';
$file = $template_path . '/pages/' . $page . '.php';
if(!@file_exists($file))
{
$page = '404';
$file = SYSTEM . 'pages/404.php';
$file = SYSTEM . 'pages/' . $page . '.php';
if(!@file_exists($file))
{
$page = '404';
$file = SYSTEM . 'pages/404.php';
}
}
}