November 13, 2012

I’m going to need a small template engine for a small project which I won’t be able to spend too much time with. The project in itself will be closed and there aren’t really any users that will be there. So I thought I’d create a small PHP-template class that will take care of the templating for me. The project will be custom built, and even though it’ll be very small, it always feels better to separate logic from templates.

I don’t need anything fancy, really the only things I need is the ability to inject data to the template files and nest these templates, hence the name, dumbtemplater.
Some of the features are:

  • External template files (Which are internally cached)
  • Ability to add CSS and JS files during the end render of the main template
  • Ability to add inline CSS in the bottom (or where ever) of the rendered file
  • Nesting of templates

Some of the things in the template engine will look familiar to you if you’ve used my JStemplateengine (Shameless self-promotion).

Try it out

Download source code for dumbtemplater