Archived
1
0
Fork 0

app/views/error/show404.volt: adding some weird message.

This commit is contained in:
Henrik Hautakoski 2018-06-13 21:52:45 +02:00
parent f82382fdaa
commit e9c6d1c863
2 changed files with 15 additions and 3 deletions

View file

@ -14,5 +14,10 @@ class ErrorController extends ControllerBase
{
// Set status code to 404.
$this->response->setStatusCode(404);
// Get the request uri to pass to google :)
$uri = ltrim($this->request->getURI(), '/');
$uri = str_replace('/', '+', $uri);
$this->view->url = $uri;
}
}

View file

@ -1,4 +1,11 @@
<div class="text-center">
<h1>404 not found</h1>
</div>
{% set google_url = "http://google.com?q=" ~ url | escape %}
<span class="text-center">
<h1>404 Not Found</h1>
<p>
This page does not exist! You can search for it on
<a target="_blank" href="{{ google_url }}">google</a>
if you want.
</p>
</span>