Template Engines ... weighing deep on my mind these days.
I use Smarty in my daily work, but it's being "abused" to the point that it's become completely pointless to use it in the first place. It basically functions as a second programming language - with objects being passed in, methods being invoked from the template, our templates have simply become subprograms written in a second programming language.
In my own private work, I've stopped using templates altogether - or rather, I use PHP as the template engine, which results in much smaller templates, and (by enforcement of my own principles) better separation of code and layout.
We keep using it simply because "that's what we use".
Now though, I find myself needing a simple "template engine" that is secure and user-friendly, which will provide users (with basic HTML knowledge) the ability to "program" very simple HTML-centric templates.
"Secure" meaning, this has to be something that won't enable the user to access objects and invoke methods in the underlying application.
"User-friendly" meaning, it has to be simple enough for a person with basic HTML knowledge to write and understand.
Can anyone recommend such an engine? It has to be something fast and lightweight.
Come to think of it, Smarty might actually do the trick, if used properly
Although I wouldn't mind something with a less "programmer" like syntax, and something a lot more lightweight.
Although, then again, I suppose Smarty might not be all that heavy, as such - although it's an enormous script, once a template has been compiled, it doesn't actually load the whole engine when it renders a template, does it?
And as a template author, there's no saying you'd have to learn the full syntax - just the basics.
Your input please!
Thanks!