Browse Source

Custom 404 layout possibility

pull/436/head
danpros 4 years ago
parent
commit
495c7ad9c8
1 changed files with 9 additions and 1 deletions
  1. +9
    -1
      system/includes/functions.php

+ 9
- 1
system/includes/functions.php View File

@ -2240,6 +2240,14 @@ EOF;
// The not found error // The not found error
function not_found() 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"); header($_SERVER["SERVER_PROTOCOL"] . " 404 Not Found");
render('404', array( render('404', array(
'title' => 'This page doesn\'t exist! - ' . blog_title(), 'title' => 'This page doesn\'t exist! - ' . blog_title(),
@ -2248,7 +2256,7 @@ function not_found()
'breadcrumb' => '<a href="' . site_url() . '">' . config('breadcrumb.home') . '</a> &#187; 404 Not Found', 'breadcrumb' => '<a href="' . site_url() . '">' . config('breadcrumb.home') . '</a> &#187; 404 Not Found',
'bodyclass' => 'error-404', 'bodyclass' => 'error-404',
'is_404' => true, 'is_404' => true,
));
), $layout);
die(); die();
} }


Loading…
Cancel
Save