• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error Pages (404, general, DB etc)

#1
[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.

#2
[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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.