CodeIgniter Forums
Combine CodeIgniter with Smarty - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Combine CodeIgniter with Smarty (/showthread.php?tid=4779)

Pages: 1 2 3


Combine CodeIgniter with Smarty - El Forum - 12-15-2007

[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!


Combine CodeIgniter with Smarty - El Forum - 12-15-2007

[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.


Combine CodeIgniter with Smarty - El Forum - 12-15-2007

[eluser]bijon[/eluser]
http://ellislab.com/forums/viewthread/44719/P0/
http://ellislab.com/forums/viewthread/60050/


Combine CodeIgniter with Smarty - El Forum - 12-16-2007

[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.


Combine CodeIgniter with Smarty - El Forum - 01-04-2008

[eluser]Peter Ivanov[/eluser]
I dont think that those template engines are good,


native PHP is much more better!


Combine CodeIgniter with Smarty - El Forum - 01-04-2008

[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.


Combine CodeIgniter with Smarty - El Forum - 01-19-2008

[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


Combine CodeIgniter with Smarty - El Forum - 01-19-2008

[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?


Combine CodeIgniter with Smarty - El Forum - 01-19-2008

[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.


Combine CodeIgniter with Smarty - El Forum - 01-19-2008

[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.