3
votes

I'm working on a project based on the October CMS, with Laravel 5.0.35.

I'm trying to override the 404 page.

The current 404 page is located here:

modules\cms\views\404.php

... and is served by:

modules\cms\classes\Controller.php

As you can see, both the controller and the view are inside modules. This folder is a dependency folder and its content should not be altered. The best approach I see here is to use an override.

You can see the October CMS structure here:

https://github.com/octobercms/october

Do you have any ideas or suggestions on how to achieve this?

Thanks.

1
I've never used it, but I'm willing to bet that you can put a 404.php file inside of your layouts directory. Maybe it's layouts/errors/404.phpOhgodwhy
Are you using a theme in October?camelCase

1 Answers

7
votes

'If the theme contains a page with the URL /404 it is displayed when the system can't find a requested page.'

http://octobercms.com/docs/cms/pages#404-page

Essentially just create a page withe the URL /404 and it will use this by default. The same can be done for an error (500) page, just use /error.