Custom error pages
Permalink 1 user found helpful
What are the recommended Best Practices for creating custom error pages (404, 401, etc)? Should these be Single Pages? Has anyone already developed an add-on for editing error pages?
I created a custom error page and followed the guidelines above, but I didn't want the my page wrapped with the default template.
I had my entire error page already themed. for example :
http://www.theoryblister.com/nothing...
I had to change a core file however. I can contribute it back if that's something useful to others.
I had my entire error page already themed. for example :
http://www.theoryblister.com/nothing...
I had to change a core file however. I can contribute it back if that's something useful to others.
If you did place some kind of example on how you did that argvader.... I'd like to know how you did it. and would find it Usefull!
Best!
Best!
not recommended but this is how i did it, and it works well
in the page_not_found.php
i added this in the header
simple to redirect to your 404 page, quick easy for a client of mine, and on my personal site
edit:
i don't know code was added to my code but this is the code without the code tag
<?php
header( 'Location:http://www.yourdomain.com/location/of/error/page/404.html'... ) ;
?>
in the page_not_found.php
i added this in the header
<?php header( 'Location:http://www.yourdomain.com/location/of/error/page/404.html'... ) ; ?>
simple to redirect to your 404 page, quick easy for a client of mine, and on my personal site
edit:
i don't know code was added to my code but this is the code without the code tag
<?php
header( 'Location:http://www.yourdomain.com/location/of/error/page/404.html'... ) ;
?>
Brass,
After using php's header function in /single_pages/page_not_found.php, were you still able to edit Content blocks? I've found that using header here breaks tiny_mce and I'm having to use meta-refresh instead which is less than ideal.
After using php's header function in /single_pages/page_not_found.php, were you still able to edit Content blocks? I've found that using header here breaks tiny_mce and I'm having to use meta-refresh instead which is less than ideal.
I wrote a tutorial about this:
http://www.codeblog.ch/2010/01/concrete5-custom-404-page/...
http://www.codeblog.ch/2010/01/concrete5-custom-404-page/...
Excellent. Remo, thanks for posting that solution. Worked great for my situation.
Thanks Remo! I applied these customizations on my site. I didn't do anything fancy yet, but it's better than the default.
My question is, do I need to create individual setThemeByPath customizations for every possible error (403, 404, etc.)? Or will "page_not_found" cover them all?
My question is, do I need to create individual setThemeByPath customizations for every possible error (403, 404, etc.)? Or will "page_not_found" cover them all?
Sorry for my ignorance... maybe I'm missing something, but I'm not getting the theme to carry over for my error 404 page. I added the following to the file you spec'd and made it functional by removing the comment.
$v->setThemeByPath('/page_not_found', "touching");
I checked to verify "touching" was the handle. Then I copied my default.php and made it page_not_found.php just to see if I could get the theme to carry over...
Can you help? My site is temporarily at:
http://gospelriver.mysitecreations.com/...
Thank you.
$v->setThemeByPath('/page_not_found', "touching");
I checked to verify "touching" was the handle. Then I copied my default.php and made it page_not_found.php just to see if I could get the theme to carry over...
Can you help? My site is temporarily at:
http://gospelriver.mysitecreations.com/...
Thank you.
Add the following line in your /config/site_theme_paths.php file
And C5 will use the view.php file in your my_theme directory or page_not_found.php file if that exists.