A simple Template library - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: A simple Template library (/showthread.php?tid=3166) |
A simple Template library - El Forum - 09-13-2007 [eluser]Jérôme Jaglale[/eluser] I was quite frustrated with the wiki's template libraries: difficult to use, not well documented, and not very readable source code. PHP and CodeIgniter are so simple, we also need a simple template system without having to learn yet another framework! :-) Here comes this Template "library": 3 lines (no kidding!), easy to understand and upgrade to match your needs. Give it a try and let me know what do you think of it! I tried to put it on CI's wiki, but I eventually gave up. Here's a direct link (doc + code): Templates with CodeIgniter A simple Template library - El Forum - 04-10-2008 [eluser]exodus7[/eluser] Jérôme: I wanted to say thanks for a job well done. I really like the way it works - I just have 1 issue with it - I like to keep my templates in sub-folders in the view folder but the current code will not allow you to do something like this: Code: $this->template->load('templates/mainTemplate', 'locations/main', $data); Code: $this->template->load('mainTemplate', 'locations/main', $data); Are there any future plans to add this feature, or is there a way to make it work? Thanks again for your contributions to CI !! A simple Template library - El Forum - 04-11-2008 [eluser]Jérôme Jaglale[/eluser] Exodus7: Thank you, I'm glad you like this tiny library. I integrated the modification suggested by Jram, so you can now put your templates in sub-folders By the way, nice website! I usually don't like Flash very much, but you use it in such an unobstructive way! |