Combine CodeIgniter with Smarty |
[eluser]Josamoto[/eluser]
Is it possible, easy and advisable to combine CI with the Smarty template engine? Any links on how its done? Thanks in advance!
[eluser]Josamoto[/eluser]
I basically want Smarty to do the parsing only, as the CI parser object would do. All the rest I'll leave to CI. So Smarty only deals with views.
[eluser]bijon[/eluser]
http://ellislab.com/forums/viewthread/44719/P0/ http://ellislab.com/forums/viewthread/60050/
[eluser]Josamoto[/eluser]
Thanks for the links. I would normally do a search before asking around, but unfortunately, my search facility for CI Forums is not working. Something to do with me being in South Africa. Thankfully, admin is looking at the problem, so hopefully I can do searches like everyone else soon.
[eluser]Peter Ivanov[/eluser]
I dont think that those template engines are good, native PHP is much more better!
[eluser]Josamoto[/eluser]
You should really take a look at Smarty and it's features. It really helps a lot with development, and it's so easy to use. I suppose it comes down to personal preference, there are many template engines out there, and some opt for developing their own engines. Anyways, I managed to get Smarty working with my CodeIgniter installation. Thanks to some handy posts in the CI Wiki pages.
[eluser]bishnoi[/eluser]
[quote author="Josamoto" date="1199493362"]Anyways, I managed to get Smarty working with my CodeIgniter installation. Thanks to some handy posts in the CI Wiki pages.[/quote] hi Josamoto, I agree with you using smarty. I have been a smarty addict before IC. Thanks
[eluser]Edemilson Lima[/eluser]
Smarty is a heavy white elephant... What you do with Smarty, you can do with pure PHP code. It have a cache feature, but it only generates PHP code from the templates with its own parser language. What do you think will run faster: do the PHP code yourself once or make the server do it for you everytime?
[eluser]Rick Jolly[/eluser]
[quote author="Edemilson Lima" date="1200766005"]Smarty is a heavy white elephant ...It have a cache feature, but it only generates PHP code from the templates with its own parser language. What do you think will run faster: do the PHP code yourself once or make the server do it for you everytime?[/quote] Wrong. If there have been no changes to the template (the template timestamp is not newer than the cached version), then smarty won't parse it. Smarty has its place.
[eluser]Edemilson Lima[/eluser]
Quote:then smarty won’t parse it. But a template made in pure PHP code is never parsed... =) Smarty cache is not a real cache. It could be if it produces pure HTML code like CI, not PHP code to be interpreted. |
Welcome Guest, Not a member yet? Register Sign In |