![]() |
Error Pages (404, general, DB etc) - 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: Error Pages (404, general, DB etc) (/showthread.php?tid=55253) |
Error Pages (404, general, DB etc) - El Forum - 10-17-2012 [eluser]moth[/eluser] I don't know if I'm alone in this, but I'm finding the error pages a bit painful. I'm using a templating system to render certain layouts, and have a "general" layout that I would like to apply to all 4 error pages as supplied by CI (404, DB, General, PHP). I know I can override the 404 in routes, and I know I could manually drop in HTML to the pages provided - but I don't want to. I want to have an Error controller, where by I can attach my template syntax to each of the 4 pages/views. Can anyone shed some light on how to approach this? I found the Exceptions class, but there's not a lot in there that's making much sense to me. Error Pages (404, general, DB etc) - El Forum - 10-17-2012 [eluser]PhilTem[/eluser] I never did such things, but I have seen that PyroCMS has a custom 404-handling. You can have a look at how it is handled in PyroCMS here. You would just have to extend it to meet your requirements. Maybe it's even possible to put something like Code: Modules::run('errors/display/db'); in errors/error_db.php. Haven't tried it yet though ;P |