views:

213

answers:

2

Hello,

As I see, there's a few Codeigniter template engines scattered all over the web, but unfortunately I can't recognize which is better in regard to: performance, features, maintenance ..etc

Some of those I've reached and seems to be mature:
Ocular-Template-Library
http://github.com/lonnieezell/Ocular-Template-Library

Template Library for CodeIgniter
http://www.williamsconcepts.com/ci/codeigniter/libraries/template/

Comper Template Parser
http://parser.comper.sk/en/

Phil Sturgeon Template library
http://philsturgeon.co.uk/code/codeigniter-template

Bucket
http://backstack.ca/projects/bucket/



Please help me decide which is better and why, detailed comparisons specially from those who already worked with some/any of these engines will be highly appreciated. Note that I'm not interested in standalone engines, only those created for Codeigniter.

PS: I'm very impressed with the long-detailed-comparisons posted for the other question "What Code Igniter authentication library is best?" here: http://stackoverflow.com/questions/346980/what-code-igniter-authentication-library-is-best and hope this one will be as much beneficial as that one.

+4  A: 

I recommend Phil Sturgeon's CodeIgniter Template.

Features include setting:

  • Page title - will predict a default if nothing is set
  • Breadcrumbs
  • Meta-data
  • Layout files - wrapper around the loaded view
  • Themes
  • Partials - load any number of views in the layout (sidebar, menu, extra footer, etc)
  • Loading views in modules
  • and more

It is used in PyroCMS; a popular CI modular CMS (which Phil also founded).

I recently asked Colin William and Phil Sturgeon the difference between their templates. Although William's has better documentation, William's said Phil's has a couple features he hasn't added to his yet such as "support for themes (setting a base directory) & it's more actively developed".

Mitchell McKenna
Good review. I also added mobile support in recently, so if your theme or view folder happens to have /mobile/ in it, all layouts and partials will be called from there when browsed with a mobile phone. Screencast coming soon :)
Phil Sturgeon
+1  A: 

In the interest of completeness, there's also Bucket which is quite similar to both Phil's CI Template and Ocular. It has nice handling of layouts, and puts all assets (incl img/js/css) into views/assets by default.

I'm partial to Ocular. It's apparently very similar to Phil's, which I've never used. Ocular seems to add some extras such as a layout-level and/or view-level caching and integration with the min lib to mosh together all those CSS and JSS asset files resulting in a single request to the server for each type.

Edit: I guess I've been using an older version of Ocular. Looks like Lonnie Ezell split out the asset handling into a separate lib.

Anaxamaxan
Yes indeedy, I like those two as well. I feel that Asset handling should be separate from general template control and his Asset library is brilliant. I'll be switching to his or Dan Horrigans soon.
Phil Sturgeon