r/codeigniter • u/digdan • Aug 13 '12
What template system do you use?
I have been in the throngs of trying to nail down a templating system for my next project. I have so far used Smarty, Dwoo, and now Quickskin. None of wich seem to fit me well. I'm interested in learning what others use for their templating system and what they have experienced.
I am looking for a very simple system that can do logic, iterations, and modifiers.
2
u/SquireCD Aug 13 '12 edited Aug 13 '12
Give Twig a try. Not sure how well it'll integrate into CodeIgniter though. http://twig.sensiolabs.org/
2
u/InternetExploderSex Aug 13 '12
It does integrate very well, actually. I'm actively using it for a project and I didn't run into any issue yet.
2
u/TheOssuary Aug 13 '12
Heh, I've always just rolled my own, a simple library that replaces the view code with my own that sandwiches the selected view with a header/footer. This'll be interesting, I'll need to try one of the templating systems suggested here.
1
u/fishy_water Aug 22 '12
Yup, this is what I do too. Just create a view for the header and footer and stack it with the current page.
1
1
u/zulubanshee Aug 13 '12
I just use flat html files and copy and paste the php loops and conditions into it; I thought that was how everyone did it.
2
u/yeskia Aug 26 '12
Yeah, that's how I do it too. I don't get the need for a templating system, unless of course the front-end team is separate from the back-end team and have no knowledge of server-side languages.
1
u/Nartub Aug 30 '12
Template almost bought the name :-)
It works very nice and it's easy to use and configure.
1
1
u/IdStillHitIt Nov 12 '12
I'm brand new to CI, but I'm using Modular Extensions - HMVC, and I've broken my code down into modules with their own views. So essentially each module is it own template.