Header/Footer at Error Message |
[eluser]hykoh[/eluser]
Hello, is it possible to display the error msg with header/footer ? for example: Code: <?php i want to display the message like: Code: $this->load->view('header'); I already tried to modify the "error_general.php", but only get error that $this is not a object in this context. Thanks for help
[eluser]John_Betong[/eluser]
Try this in your Controller Code: <?php Your view Code: <html>
[eluser]hykoh[/eluser]
it looks in any way ugly. isnt there any easier way to just include header/footer directly in the error_general.php ? should be always the same header/footer templates, only the error text changes
[eluser]John_Betong[/eluser]
My apologies, I did not understand exactly what you were after so I will try again. I am not sure how error_general.php but it does accept the $heading and $message variables. To achieve your result then what you could try is: Code: <?php include_once($path .'..\..\views\_header.php') ?> You will have to play about with the paths to make sure they are correct.
[eluser]hykoh[/eluser]
if it would be so easy - i had no problem ;-) the problem with your solution is: normally, i have defined one main_model at autoload, which offers the needed variables for the menu for example in the header/footer itself. but if i just include these files, there's still no class instance you know ?
[eluser]John_Betong[/eluser]
I think what you are trying to do is far from straight forward and not easily available. Similar problems have arisen in the past with the error_404.php output. Try this thread : http://ellislab.com/forums/viewthread/81728/ |
Welcome Guest, Not a member yet? Register Sign In |