From e9c6d1c86374f4733cb35a7074312059b42da89f Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Wed, 13 Jun 2018 21:52:45 +0200 Subject: [PATCH] app/views/error/show404.volt: adding some weird message. --- app/controllers/ErrorController.php | 5 +++++ app/views/error/show404.volt | 13 ++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/app/controllers/ErrorController.php b/app/controllers/ErrorController.php index 3149046..62b5d74 100644 --- a/app/controllers/ErrorController.php +++ b/app/controllers/ErrorController.php @@ -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; } } diff --git a/app/views/error/show404.volt b/app/views/error/show404.volt index 516e543..5182422 100644 --- a/app/views/error/show404.volt +++ b/app/views/error/show404.volt @@ -1,4 +1,11 @@ -
-

404 not found

-
+{% set google_url = "http://google.com?q=" ~ url | escape %} + + +

404 Not Found

+

+ This page does not exist! You can search for it on + google + if you want. +

+