Template library for CD3 |
(09-04-2015, 05:27 PM)Camo Wrote: I looks quite simple. How can I register My_Controller? Well, this is a basic functionality of codeigniter, you can declare master classes like MY_Controller, MY_Model, MY_Loader... and after extend from this classes to don't repeat code. You only must to put MY_Controller.php (for example) file at core folder and then extend any controller from MY_Controller instead CI_Controller. In my example I declare protected $template attribute at MY_Controller class, then if i extend any controller from MY_Controller I cann to access to the attribute with $this->template (This is a basic OO feature) http://www.codeigniter.com/user_guide/ge...asses.html
Greetings.
|
Messages In This Thread |
Template library for CD3 - by Camo - 09-03-2015, 06:18 PM
RE: Template library for CD3 - by Camo - 09-04-2015, 11:38 AM
RE: Template library for CD3 - by rtorralba - 09-04-2015, 01:59 PM
RE: Template library for CD3 - by Camo - 09-04-2015, 04:54 PM
RE: Template library for CD3 - by rtorralba - 09-04-2015, 05:12 PM
RE: Template library for CD3 - by Camo - 09-04-2015, 05:27 PM
RE: Template library for CD3 - by rtorralba - 09-04-2015, 05:49 PM
RE: Template library for CD3 - by Camo - 09-04-2015, 06:34 PM
RE: Template library for CD3 - by rtorralba - 09-05-2015, 02:28 AM
|