mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 17:29:21 +02:00
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:
parent
64fe0062ee
commit
c8443228fb
10
index.php
10
index.php
@ -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';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user