Custom 404 page?

Permalink 1 user found helpful
I'm trying to spruce up the "Page Not Found" page, and was hoping for an option besides editing /concrete/single_pages/page_not_found.php in the efforts of leaving the concrete folder alone as much as possible to make upgrades easier. Is there any way to just point 404 errors to a themed page in the site itself?


View Replies:
jvmme replied on at Permalink Reply
As far as doing it with Concrete5 i am not sure.

This is how you do it in general:

Make the custom 404 page and modify the .htaccess file.
ryan replied on at Permalink Reply
Open up config/site_theme_paths.php

That file allows you to assign a theme based on a page's path within the site:
Uncommenting these lines would do it, replace "yourtheme" with your theme's handle.
$v = View::getInstance();
$v->setThemeByPath('/page_not_found', "yourtheme");
// as of 5.3.2 if you don't specify your them it'll use the site's current theme

Then if you pull up: directly in your browser you should be able to put it in edit mode and add text to an area.

If that's not enough for you and you want to really customize it, you can override it by copying the file from:
then do whatever you want to it.
razorfrog replied on at Permalink Reply
Thanks! Edited the config/site_theme_paths.php file and added a page_not_found page to edit. Works perfectly!
SeanBrogan replied on at Permalink Reply
Sorry to necro this thread.....

I am having problems with this.
I have copied login.php and register.php to single_pages and altered the site_theme_paths in config. Also I have view.php in my themes folder.
The login and register pages are still showing as standard concrete theme.
What am I missing.
Thanks for the help
CWSpear replied on at Permalink Reply
I'm having the same problem as SeanBrogan. I created custom 404s and logins for another site just two days ago and set them to the default theme and it worked great. Now this morning when I tried it, it didn't work!

They are on different servers. Could it have something to do with the server config?