diff --git a/system/includes/functions.php b/system/includes/functions.php index 5185ac6..27f3748 100644 --- a/system/includes/functions.php +++ b/system/includes/functions.php @@ -2240,6 +2240,14 @@ EOF; // The not found error function not_found() { + $vroot = rtrim(config('views.root'), '/'); + $lt = $vroot . '/layout--404.html.php'; + if (file_exists($lt)) { + $layout = 'layout--404'; + } else { + $layout = ''; + } + header($_SERVER["SERVER_PROTOCOL"] . " 404 Not Found"); render('404', array( 'title' => 'This page doesn\'t exist! - ' . blog_title(), @@ -2248,7 +2256,7 @@ function not_found() 'breadcrumb' => '' . config('breadcrumb.home') . ' » 404 Not Found', 'bodyclass' => 'error-404', 'is_404' => true, - )); + ), $layout); die(); }