Get started with TempLight


A very usefull feature of a decent templating language is the inheritance. This allow you to create flexible master page :

First we need a master template "masterpage.html" :

    <title><block name="title">Default title</block></title>
        <block name="content">
        Default content

And later we extends the master template with another template file. The block tags of the master template are the parts that must be redefined.

<extends path="masterpage.html"/>
<block name="title">My title !</block>
<block name="content">
My content !

We could also use the include tag to get data from a another template :

<include path="inclusion.html"/>

For the moment these read on disk operations aren't cached by TempLight but this could be acheived very easily if needed.