![]() |
Load plugins into Libraries - 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: Load plugins into Libraries (/showthread.php?tid=2719) |
Load plugins into Libraries - El Forum - 08-21-2007 [eluser]Freakish_05[/eluser] Hello everyone! I've developed a simple view library that does all the repetative things of putting my header, footer, sidebar and 'view' files together. I've also coded a plugin which creates my sidebar for me. I'm trying to load this plugin into my 'view' library but its not having any of it. Layout.php (view library) Code: <?php The error message I'm getting is Code: Fatal error: Call to a member function plugin() on a non-object in D:\Webserver\htdocs\zomg\system\libraries\Layout.php on line 13 Is there a way to include this plugin into the library? If so, how do I do it? If not I'm assuming that I'll have to use the plugin in the controller and then pass the results back to the 'view' library. Thanks in advance, Freakish_05 Load plugins into Libraries - El Forum - 08-21-2007 [eluser]rogierb[/eluser] You uUse Code: $this->layout =& get_instance(); in your constructor so call your plugin with: Code: $this->layout->load->plugin('sidebar'); |