Welcome Guest, Not a member yet? Register   Sign In
Header & footer to all of the pages
#4

[eluser]Fr3aked0ut[/eluser]
OK so im using Chuck Son's take:
http://codeigniter.com/wiki/Chuck_Son's_take/
Now, this is my hook (config):
Code:
$hook['pre_controller'] = array(
                      'class'  => 'Template',
                      'function' => 'header',
                      'filename' => 'template.php',
                      'filepath' => 'hooks'
                      );
$hook['post_controller'] = array(
                      'class'  => 'Template',
                      'function' => 'footer',
                      'filename' => 'template.php',
                      'filepath' => 'hooks'
                      );

And this is template.php:
Code:
<?php

class Template extends Controller {
      function Template() {
        parent::Controller();
        $this->load->helper('url');
        $this->load->helper('html');
        $this->load->database();
      }
        
    function header()
    {
//code...
        $this->load->view('header');
    }
      function footer() {
          $this->load->view('footer');
      }
}

?>
When I get into my site, this error is displayed:
Quote:Fatal error: Call to a member function _assign_libraries() on a non-object in /system/libraries/Loader.php on line 1059


Messages In This Thread
Header & footer to all of the pages - by El Forum - 01-17-2010, 06:46 AM
Header & footer to all of the pages - by El Forum - 01-17-2010, 07:02 AM
Header & footer to all of the pages - by El Forum - 01-17-2010, 09:39 AM
Header & footer to all of the pages - by El Forum - 01-17-2010, 12:12 PM
Header & footer to all of the pages - by El Forum - 01-17-2010, 12:38 PM
Header & footer to all of the pages - by El Forum - 01-17-2010, 01:11 PM
Header & footer to all of the pages - by El Forum - 01-17-2010, 02:33 PM
Header & footer to all of the pages - by El Forum - 01-18-2010, 10:26 AM



Theme © iAndrew 2016 - Forum software by © MyBB