mirror of
https://github.com/danpros/htmly.git
synced 2026-04-20 12:36:23 +05:30
Custom 404 layout possibility
This commit is contained in:
parent
1c16023e42
commit
495c7ad9c8
1 changed files with 9 additions and 1 deletions
|
|
@ -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' => '<a href="' . site_url() . '">' . config('breadcrumb.home') . '</a> » 404 Not Found',
|
||||
'bodyclass' => 'error-404',
|
||||
'is_404' => true,
|
||||
));
|
||||
), $layout);
|
||||
die();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue