A pragmatic approach to templating for PHP 7.x
Most of today's templating engines mix code for the required rendering logic with HTML markup in one file and require the developers to learn their respective language.
Templado follows a different approach on templating: Being in part inspired by Tempan, Templado relies solely on plain HTML markup. The limited amount of display logic required is contained with the engine and triggered by the view model when it's applied to the Page.
As a Templado template is plain HTML, previewing is as easy as opening the HTML file with a browser - example data can and should be included as the engine will clean it up based on the view model upon rendering.
Templado features asset support, mapping a list of assets based on their ID into a given HTML Page. To automate this process Templado CLI can be used. Combined with a File watcher in your IDE, you can have an always up-to-date set of HTML pages without ever writing a block twice.
To make form handling even more easy, Templado comes with explicit HTML Form support. Based on supplied Input data, Templado will repopulate the HTML form and even include your CSRF protection code.
Templado allows for custom transformations, like adding a class to every a
tag and string based replacements upon
serialization.
Usage examples can be found in the example project