I want to implement template engine for view. |
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.h...ght=smarty
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.
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.
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.
|
Welcome Guest, Not a member yet? Register Sign In |