Load the 404 page from a controller - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Load the 404 page from a controller (/showthread.php?tid=17869) |
Load the 404 page from a controller - El Forum - 04-18-2009 [eluser]Tim Reynolds[/eluser] Hi, I am sure there is a simple way to do this but could not find it in the guide. I have a default controller that takes the first uri segment and if it is not a controller checks a pages db and loads it from there. This controller can return nothing if the page is not in the db. How do i point this at the normal 404 page in 'application/errors'? or is it easier to copy the errors into the views? Thanks Tim Load the 404 page from a controller - El Forum - 04-18-2009 [eluser]Keem1[/eluser] Did you try this? Code: show_404('page'); Load the 404 page from a controller - El Forum - 04-18-2009 [eluser]Tim Reynolds[/eluser] Thats great thanks Load the 404 page from a controller - El Forum - 04-18-2009 [eluser]Tim Reynolds[/eluser] How would i call the other standard error pages say error_db? Load the 404 page from a controller - El Forum - 04-18-2009 [eluser]Keem1[/eluser] [quote author="Tim Reynolds" date="1240086616"]How would i call the other standard error pages say error_db?[/quote] Use this method for other error messages: Quote:show_error('Your custom error message goes here!'); Load the 404 page from a controller - El Forum - 04-18-2009 [eluser]Keem1[/eluser] I missed the topic, and deleted this post's content! |