Latte

the safest & truly intuitive templates for PHP
GET STARTED

Call Security 🛡️

We made security our top priority and created Latte as the safest templating system. We came up with context-aware escaping, which prevents threats of XSS. Latte protects your work from many security traps.

It is Really Fast

Latte compiles template down to the optimal PHP code at the same time as you work. So it is as quick as if you created purely PHP.

The compiled PHP code is clear and easy to debug. The template is automatically recompiled each time we change the source file.

Over 10 Years

We have been developing Latte for over 10 years- and counting! Libraries we provide are therefore highly mature, stable, and widely used. They are trusted by a number of global corporations and many significant websites rely on us. Who uses and trusts Latte?

You Already Know the Syntax

No kidding, you know Latte syntax already. It is the same as PHP syntax. You don’t have to worry about writing in Latte. You just stick to what you already know.

Save Your Energy

You don’t have to waste your energy on thinking where to use {% %} and where {{ }}. No struggles with confusing 'for item in array' in templates with 'foreach $array as $item' in PHP. You can just use the same thing in both places.

<!DOCTYPE html>
<html>
    <head>
        <title>{$title|upper}</title>
    </head>
    <body>
        {if count($menu) > 1}
            <ul class="menu">
                {foreach $menu as $item}
                <li><a href="{$item->href}">{$item->caption}</a></li>
                {/foreach}
            </ul>
        {/if}
    </body>
</html>

Save the Keyboard

In Latte, this template can be written much more cost-effectively. Each pair tags, such as {if} … {/if}, operating upon single HTML element can be written in n:attribute notation. We will overwrite {if} and {foreach}

<body>
    <ul class="menu" n:if="count($menu) > 1">
        <li n:foreach="$menu as $item">
            <a href="{$item->href}">{$item->caption}</a>
        </li>
    </ul>
</body>

Full Package

No important features are missing in Latte. It provides support for creating layouts, blocks, template inheritance, autoescaping, and much much more useful stuff.

Latte is natively supported by NetBeans and it has s PhpStorm plugin.

A Next-Generation Templating System

When it comes to templates, it pays off to be demanding and always expect nothing but the best. Latte is a true designer-friendly templating language. You will surely appreciate its intuitive syntax and enjoy many of its useful goodies.