Looking at using a template system for a new project, it's only a small site and don't want to use the overhead and 'complexity' of smarty. I don't really like template systems that force you to make use of another language just to make it easier for designers (apparently).
Something like this http://www.namepros.com/code/517342-php5-template-class.html is what Im looking at but something which is a bit more robust and proven.
I would recommend using Twig
Also read Fabien Potencier's blog post, where he explains needs for a powerful and customizable template engine.
{% extends "layout.html" %}
{% block title %}
{{ page.title|escape|title }}
{% endblock %}
{% block content %}
Content of the page...
{% for user in users %}
* {{ user.name }}
{% else %}
No user has been found.
{% endfor %}
{% endblock %}
{# this is a comment in twig syntax #}
Also if you need additional components for web development, but you already have a defined code base, have look at Symfony Components which includes additional templating component (mentioned in XUE Can answer)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With