Welcome Guest, Not a member yet? Register   Sign In
New to CI - Small bugs in the view
#6

[eluser]jtkendall[/eluser]
Did you try what I suggested? You cannot use
Code:
$this
outside of a class definition. So since your view file is not a class, but a regular PHP file, you're just including the Parser library. You're not initializing it.

If you insist on loading the library in your view you need to first initialize the class and then call the parse method like this:

Code:
<?php
        $this->load->library('parser');
        $parser = new CI_Parser();
        $data = array(
            'title' => 'RSVP',
            'header' => ''
            );
        $parser->parse('partial/header', $data);
        $this->load->view('partial/menu');
?>

Though IF you load it in the controller you can use your code as is.


Messages In This Thread
New to CI - Small bugs in the view - by El Forum - 09-21-2008, 08:06 PM
New to CI - Small bugs in the view - by El Forum - 09-21-2008, 09:34 PM
New to CI - Small bugs in the view - by El Forum - 09-21-2008, 10:28 PM
New to CI - Small bugs in the view - by El Forum - 09-21-2008, 10:33 PM
New to CI - Small bugs in the view - by El Forum - 09-22-2008, 08:16 AM
New to CI - Small bugs in the view - by El Forum - 09-22-2008, 09:20 AM
New to CI - Small bugs in the view - by El Forum - 09-22-2008, 10:43 AM



Theme © iAndrew 2016 - Forum software by © MyBB