Within Deployteq the template language Smarty is used to render the contents. With the template language Smarty complex data can be formatted, conditions can be applied to the data and the information can be added to content.

It is possible to add Smarty variables through the Deployteq interface, for example when you add the system field firstname:


You can use most of the standard functions and modifiers provided by the Smarty language. For more information you can consult the Smarty documentation to explore the various functions and methods: https://www.smarty.net/docs/en/.

In this documentation the most commonly used Smarty functions/modifiers specific to Deployteq will be explained.


Deployteq syntax

If you are familiar with Smarty or have consulted the Smarty documentation, you will see that Smarty code is typically written using single curly braces. However, within Deployteq, we have modified the standard syntax to use double curly braces.

Smarty syntax

By default, a Smarty tag is enclosed within single curly braces:

{* This is a comment *}
{$smarty.now}


Within Deployteq, Smarty tags are enclosed within double curly braces::

{{* This is a comment *}}
{{$smarty.now}}

If Smarty is inserted within HTML elements, such as a table or within the <head> section, it is advisable to wrap the Smarty code in HTML comments. This ensures that the HTML is not modified by the browser if it detects invalid HTML;

HTML comments

<html dir="ltr">
    <head>
        <title>Test page</title>
    </head>
    <body>
        <table>
            <!--{if 1 eq 1 }-->
            <tr>
                <td>Show this row</td>
            </tr>
            <!--{/if}-->
        </table>
    </body>
</html>