What are some PHP template engines that offer a simple, short syntax? What we're looking for is:
- Conditionals (if/else)
- Foreach loops
- Variable replacements
- Able to create custom tags (i.e., for URL generators)
We need it to be secure because the applications are being run on our own servers, but we still want people to be able to edit the way things look. This is why we're disregarding the pure PHP-based systems.
I love how Django's engine works, but the only PHP implementation I've seen (Calypso) is not very mature and doesn't look like it's going anywhere.
A newish project called Dwoo looks interesting but it's taking a bit of work to get it working the way we need it to. Basically we have to get templates from a database and then cache the "compiled" version to memcached, but Dwoo doesn't offer a very simple way to switch template providers/caching mechanisms. It's tied to the filesystem and filesystem-like behaviors. It is possible, but we're looking for other options.
We may just end up using Smarty. But I'm not sure of the future of this project, it seems a bit dead.