![]() |
I want to implement template engine for view. - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6) +--- Forum: CodeIgniter 3.x (https://forum.codeigniter.com/forumdisplay.php?fid=17) +--- Thread: I want to implement template engine for view. (/showthread.php?tid=1031) |
I want to implement template engine for view. - Vimal - 02-06-2015 Hi, I used smarty library(github) before for template system but its not working in new ci3. Tell me how can i implement on it. I want to use smarty or twing(which one better if any?? ![]() ![]() ![]() RE: I want to implement template engine for view. - rakibtg - 02-07-2015 It would be great if CI3 comes with Twig templating engine. RE: I want to implement template engine for view. - Rufnex - 02-07-2015 CI will not be shipped with a template engine. We have native php for templating. Look also into this thread: http://forum.codeigniter.com/thread-21.html?highlight=smarty RE: I want to implement template engine for view. - Vimal - 02-07-2015 Every one right. But i think different way. I prefer to use template engine. Template engines comes with caching feature. May be you are right native php faster than template engine but i would like to say template engine make production faster for view file.And in my case i used smarty with ci 2.x version before and i didn't find any speed issue. ![]() RE: I want to implement template engine for view. - Rufnex - 02-07-2015 As said, it depends no our personal preferences ;o) But it's not a big issue to include a third party library into CI like smarty. RE: I want to implement template engine for view. - paralogizing - 02-07-2015 BootPress is built on CodeIgniter and uses Smarty for templating. Check it out. I weighed the pros and cons of Smarty vs Twig myself, and ultimately decided on Smarty. Twig seems to be more hip, but Smarty has been around a long time, and I chose it because you can include objects. I wasn't able to figure out how to do that in Twig. Plus, I like the syntax a lot more. If you decide to use Twig, you may want to consider using Symfony also. Those two go hand in hand. RE: I want to implement template engine for view. - Vimal - 02-08-2015 Hmm, I tried last day twig. But its seems complicated more than native php for view ![]() |