CodeIgniter Forums
When using $this->load->library('table'), shouldn't it be in views??? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: When using $this->load->library('table'), shouldn't it be in views??? (/showthread.php?tid=26462)



When using $this->load->library('table'), shouldn't it be in views??? - El Forum - 01-14-2010

[eluser]123wesweat[/eluser]
Hi all,

I am following: http://www.ibm.com/developerworks/opensource/library/os-codeigniter/index.html?S_TACT=105AGX01&S_CMP=HP

and i was wondering if the use of
Code:
$this->load->library('table')

should be in a view file instead of in a controller file??


When using $this->load->library('table'), shouldn't it be in views??? - El Forum - 01-14-2010

[eluser]rogierb[/eluser]
Nah, it should be in the controller. That's the place for logic.
I guess you are confused because it is the 'table' class.
But is is just another class, just like the form_validation for instance.

The only thing you want in your view is whatever you want to output.


When using $this->load->library('table'), shouldn't it be in views??? - El Forum - 01-14-2010

[eluser]123wesweat[/eluser]
Quote:I guess you are confused because it is the ‘table’ class.

yep, i was thinking: "he that's html (generates html) so it needs to be in the view folder"

still need to get a more MVC mindset.