Fatal error: Call to a member function set_template() on a non-object |
[eluser]skylerrichter[/eluser]
I have a weird issue occurring with the HTML table class when I extends models. I found one other thread with a similar issue but it doesn't seem to be the same issue all together http://ellislab.com/forums/viewthread/78244/ The dashboard controller extends the private controller which is just an extension of the default controller with some user authentication. I load the comments model. Get a result set of comments. and load a view file. here is what my view file looks like: Code: <?php $this->table->set_template(array('table_open' => '<table border="0" cellpadding="0" cellspacing="0" width="100%">', 'row_alt_start' => '<tr class="alt">')); ?> here is what my controller looks like: Code: class Dashboard extends Private_Controller If I remove this line from my view Code: <?php $this->table->set_template(array('table_open' => '<table border="0" cellpadding="0" cellspacing="0" width="100%">', 'row_alt_start' => '<tr class="alt">')); ?> everything works... including the codeigniter pagination class that is in the same view. How come the HTML table class stops working but the pagination class doesnt? Note: both the table class and pagination classes are loaded in the autoload config
[eluser]pistolPete[/eluser]
Did you load the library? Code: $this->load->library('table');
[eluser]skylerrichter[/eluser]
Yes i tried loading the libraries manually too. |
Welcome Guest, Not a member yet? Register Sign In |