Welcome Guest, Not a member yet? Register   Sign In
Customizing error templates
#1

[eluser]mrtopher[/eluser]
I'm trying to customize the error templates that are used by CodeIgniters error functions (http://ellislab.com/codeigniter/user-gui...rrors.html).

I'm getting an error when trying to access session variables in the template. Is there any way to access CI classes and variables in the error templates?
#2

[eluser]gtech[/eluser]
not 100% sure what you are trying to do.. are you on about adding code in system\application\errors to call the controller methods?

its a long shot and I havn't tried it.. could you use the CI instance?

Code:
<?php
$CI =& get_instance();
$CI->load->session->.....
?>
#3

[eluser]mrtopher[/eluser]
Yeah, I'm trying to get the error templates to look like the rest of my program and it needs to access session variables.

I was thinking that something like your suggestion might work I just wasn't sure where to put that code. I will try it at the top of the template file and see if that works.




Theme © iAndrew 2016 - Forum software by © MyBB