Fallback to default template if selected template missing from theme
This commit is contained in:
parent
aef29f18ab
commit
939fc983cc
@ -15,7 +15,11 @@ if (!getsiteid()) {
|
|||||||
$theme = $database->get("sites", "theme", ["siteid" => getsiteid()]);
|
$theme = $database->get("sites", "theme", ["siteid" => getsiteid()]);
|
||||||
|
|
||||||
$template = getpagetemplate();
|
$template = getpagetemplate();
|
||||||
include __DIR__ . "/themes/$theme/$template.php";
|
if (file_exists(__DIR__ . "/themes/$theme/$template.php")) {
|
||||||
|
include __DIR__ . "/themes/$theme/$template.php";
|
||||||
|
} else {
|
||||||
|
include __DIR__ . "/themes/$theme/default.php";
|
||||||
|
}
|
||||||
|
|
||||||
if (isset($_GET['edit'])) {
|
if (isset($_GET['edit'])) {
|
||||||
?>
|
?>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user