Twig

Discover the power of the Twig templating engine used by Tebex.

Templates on the Tebex platform are written in the Twig Templating Engine. Twig allows you to customise your store with control structures, similar to any other language, while maintaining a sandboxed and safe environment for the Tebex infrastructure.

You're able to learn more information about the syntax of Twig by viewing the official documentation.

A common Twig file may look like the following:

<!DOCTYPE html>
<html>
    <head>
        <title>My Webpage</title>
    </head>
    <body>
        <ul id="navigation">
        {% for item in navigation %}
            <li><a href="{{ item.href }}">{{ item.caption }}</a></li>
        {% endfor %}
        </ul>

        <h1>My Webpage</h1>
        {{ a_variable }}
    </body>
</html>

If you're interested in becoming a pro at the Twig syntax, you can complete the official Twig certification programme.

Last updated