Welcome Guest, Not a member yet? Register   Sign In
I want to implement template engine for view.
#1
Wink 
(This post was last modified: 02-06-2015, 11:10 PM by Vimal.)

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?? Cool ).
Angel Confused
Reply
#2

It would be great if CI3 comes with Twig templating engine.
Reply
#3

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

Reply
#4

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. Smile
Reply
#5

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.

Reply
#6

(This post was last modified: 02-07-2015, 02:53 PM by paralogizing.)

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.
Reply
#7

(This post was last modified: 02-08-2015, 06:35 AM by Vimal.)

Hmm, I tried last day twig. But its seems complicated more than native php for view Wink. I think smarty perfect for me because I already used before.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB