Welcome Guest, Not a member yet? Register   Sign In
Load default views
#3

[eluser]Wogan[/eluser]
Thanks, but after using the word "hook", I thought there might be an easier way. Turns out there was.

In config/config.php, set $config[enable_hooks] = TRUE (line 91). Then in config/hooks.php, I added:

Code:
$hook['post_controller'] = array(
'class'    => 'Customhooks',
'function' => 'global_footer',
'filename' => 'Customhooks.php',
'filepath' => 'hooks',
'params'   => ''
);

Then in application/hooks, I created Customhooks.php, with the following code:

Code:
class Customhooks extends Controller
{

    function global_footer()
    {
        $this->load->view('global_footer');
    }

}

And bingo. It worked Smile


Messages In This Thread
Load default views - by El Forum - 11-18-2008, 02:02 PM
Load default views - by El Forum - 11-18-2008, 02:11 PM
Load default views - by El Forum - 11-18-2008, 02:15 PM
Load default views - by El Forum - 11-18-2008, 02:32 PM
Load default views - by El Forum - 11-18-2008, 03:00 PM
Load default views - by El Forum - 11-18-2008, 04:22 PM
Load default views - by El Forum - 11-25-2008, 08:02 PM



Theme © iAndrew 2016 - Forum software by © MyBB