I started researching this topic for a couple of reasons...
1) To reduce repetitive code in my controllers 2) To configure 3 main layouts used in my website - 1 column, 2 column and 3 column pages 3) To be able to have separate partial view files, and load them accordingly according to the template (main-content, header, footer and sidebar)
I have googled this topic and come up with very few examples with user-friendly documentation, and I was hoping for some guidance.
http://net.tutsplus.com/tutorials/php/an-introduction-to-views-templating-in-codeigniter/ by Sam Stevens is great... but lacks the dynamicism needed to load individual view files for each template.
https://github.com/jenssegers/CodeIgniter-Template-Library by Jens Segers just confuses the life out of me with this unnecessary widget malarkey.
http://philsturgeon.co.uk/blog/2009/12/CodeIgniter-Template-library by Phil Sturgeon looks good... but lack of docs and bugs make it very difficult for a newbie like me to get up and running.
http://williamsconcepts.com/ci/codeigniter/libraries/template/index.html by William Concepts seems to be the best from what I can gauge from other users - but it's not out-of-the-box ready, and I am getting errors about trying to define the likes of header twice! It's just not working for me.
If someone can advise me which library (or other one) would best fulfill what I'm trying to achieve I could then put all my attention into implementing and understanding it, instead of jumping between examples...
Also, all of these examples seem to be (originally) YEARS old (bar Sam Steven's) which makes me wonder, is there not newer or more recent examples available?