Welcome Guest, Not a member yet? Register   Sign In
How can I get show_error() to load views?
#5

[eluser]CroNiX[/eluser]
@Tpojka, 2nd parameter is null because I'm not passing any data to the "head" view (in this very brief, bare bones example), but I needed to have true in the 3rd parameter to return the view instead of output it so had to enter something there. Maybe it should have just been an empty array().

@cdechery, yes, this is bare bones to show the concept. My actual template library is loading many additional things as well, such as passing an array of sidebar widget view names which the template loads dynamically, if any exist, or it creates the default widgets. The header view shows a login form, or the current logged in users details, link to profile, etc.

Also, you might be able to directly include(/path/to/head.php) within your stock CI error templates instead of using CI to load it. It's just HTML along with some, probably, simple php. I don't use (or ever see) any of those templates except the 404 error once it's out of development mode.


Messages In This Thread
How can I get show_error() to load views? - by El Forum - 11-22-2013, 09:57 AM
How can I get show_error() to load views? - by El Forum - 11-22-2013, 12:26 PM
How can I get show_error() to load views? - by El Forum - 11-23-2013, 05:24 AM
How can I get show_error() to load views? - by El Forum - 11-23-2013, 06:48 AM
How can I get show_error() to load views? - by El Forum - 11-23-2013, 10:35 AM



Theme © iAndrew 2016 - Forum software by © MyBB