![]() |
Template library for CD3 - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: External Resources (https://forum.codeigniter.com/forumdisplay.php?fid=7) +--- Forum: Addins (https://forum.codeigniter.com/forumdisplay.php?fid=13) +--- Thread: Template library for CD3 (/showthread.php?tid=62872) |
Template library for CD3 - Camo - 09-03-2015 Hello, Can you help me to choose template library for CD3? Which one do you use? It should be well documented. RE: Template library for CD3 - Camo - 09-04-2015 Meanwhile I wrote my own solution. But please can you tell me where I can find some libraries for CD3 ie. template lib? I am totally newbie in CD. I go according one very old tutorial and is not actual as you can surmise. This is my: PHP Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); RE: Template library for CD3 - rtorralba - 09-04-2015 (09-04-2015, 11:38 AM)Camo Wrote: Meanwhile I wrote my own solution. You can use plates php, I like it because has template properties like inheritance but don't have new syntax, is php RE: Template library for CD3 - Camo - 09-04-2015 Thanks, but I need some examples how implement it to the CI. Syntax is no problem so it would be better to use something robust. But main is the documentation for CI. RE: Template library for CD3 - rtorralba - 09-04-2015 (09-04-2015, 04:54 PM)Camo Wrote: Thanks, but I need some examples how implement it to the CI. Syntax is no problem so it would be better to use something robust. But main is the documentation for CI. You simply can use it with composer:
PHP Code: class MY_Controller extends CI_Controller
PHP Code: class Example_Controller extends MY_Controller RE: Template library for CD3 - Camo - 09-04-2015 I looks quite simple. How can I register My_Controller? RE: Template library for CD3 - rtorralba - 09-04-2015 (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/general/core_classes.html RE: Template library for CD3 - Camo - 09-04-2015 Thank you that's what I was looking for. Also the CodeIgniter-Ion-Auth works very well ![]() RE: Template library for CD3 - rtorralba - 09-05-2015 (09-04-2015, 06:34 PM)Camo Wrote: Thank you that's what I was looking for. Also the CodeIgniter-Ion-Auth works very well You are welcome, just click on rate button at my post if I helped you. |