Welcome Guest, Not a member yet? Register   Sign In
Loading views within the error template
#1

[eluser]Unknown[/eluser]
Hey, I am completely new to CI and am just experimenting with it at the moment. It looks brilliant so far.

I am however trying to make the 404 Error template fit in with the rest of my application. To achieve this, I have created two views called "tpl_header.php" and "tpl_footer.php" which are included within all the other views.

This doesn't seem to be possible within the error template however as it isn't a normal "view". Is there any way I can include the template files?

Regards,
Dan
#2

[eluser]TheFuzzy0ne[/eluser]
Can't be done. The error page has to also work in the event that CodeIgniter itself is not working. It's not loaded or parsed as a view, and therefore CodeIgniter is inaccessible. I have created a static header which is the same as the dynamic one, but stripped of all variables. Granted, some data is missing, but the error page looks like it's a part of the Web site, and users can use the top navigation to navigate elsewhere, such as the Contact Us form to complain...
#3

[eluser]TheFuzzy0ne[/eluser]
Oh, and welcome to the CodeIgniter community!! (Sorry, got distracted).
#4

[eluser]Unknown[/eluser]
ok i'll get to work doing that then.
thanks for the quick reply!




Theme © iAndrew 2016 - Forum software by © MyBB