Welcome Guest, Not a member yet? Register   Sign In
Using a library within a view
#1

[eluser]Unknown[/eluser]
Hello all

Is it possible to load and use a library within a view.
I have a class which has a number of functions that do common tasks, such as building a select tag from an array.

If I load the library in the view with $this->load->library('htmllib') I don't get any error, but as soon as I reference the class with $this->htmllib->test() I get Undefined property: CI_Loader::$htmllib.

If I load the library within the controller and try to call of the functions all is ok, however as the purpose of the class is to deal with rendering html elements (in this case a select) I would like to keep this in the view.

Thanks in advance for any info / advise on this.

Andrew


Messages In This Thread
Using a library within a view - by El Forum - 09-29-2009, 09:38 AM
Using a library within a view - by El Forum - 09-29-2009, 01:22 PM
Using a library within a view - by El Forum - 09-29-2009, 01:52 PM
Using a library within a view - by El Forum - 09-24-2010, 11:24 AM



Theme © iAndrew 2016 - Forum software by © MyBB