HTML templates allow you to save frequently used HTML codes for advertising materials so you don’t have to rewrite them every time. Additionally, HTML templates can be equipped with specific placeholders to enable predefined input. Instead of entering data directly into the code, a form with input fields for the respective data appears, simplifying the creation of advertising materials.
Accessing/Adding HTML Templates:
General - Miscellaneous - HTML Templates.
Here you will find templates that we have already created for you. You can create additional custom templates at any time. We recommend using clear and distinct names for your templates so it is clear which template is needed when selecting for the creation of advertising materials.
Defining Input Fields
If an HTML template should allow specific input fields, the placeholder %template:x% must be used in the HTML code of the template. Place the placeholder where the entered data should be inserted. The text in place of x is used as the field label. Example:
<a target="_blank" href="%url%">%template:URL-Text%</a>This example creates an HTML template with an input field labeled "URL-Text".
Settings Options for Input Fields
The %template% placeholder can also be extended with various settings for input and output of data. To do this, write the placeholder as %template{}:x%. Inside the curly braces, list the respective settings separated by pipes (|).
Example: Text Ad for Tripplebanner
This example creates input fields for the headline, text line 1, text line 2, and the display URL.
<div align="left" style="text-align:left; line-height:0.9em;">
<a target="_blank" href="%url%" style="text-decoration:none; font-size:9pt; font-weight:normal; font-family:Arial; color:black; "><b style="font-size:9pt; font-weight:bold; font-family:Arial; color:blue;">
%template{max=25|htmlentities=1}:Headline%</b><br>
%template{max=35|htmlentities=1}:Text Line 1%<br>
%template{max=35|htmlentities=1}:Text Line 2%<br>
<span style="font-size:9pt; font-weight:bold; font-family:Arial; color:green; line-height:0.9em;">
%template{max=35|htmlentities=1}:Display URL%</span></a>
</div> The following settings are possible for data input:
| max=x | The text may be up to x characters long. |
| typ=0 | normal text field |
| typ=1 | color selection field |
| typ=2 | multi-line text field |
| typ=3 | simple checkbox Yes/No (1/0) |
| typ=4 | checkbox. Depending on the state, the value set via checked= or unchecked= is output. (Description: HTML Templates | Checkbox)
|
| typ=5 | selection (radio buttons, single choice). The options are defined via values=; the value of the selected option is output. (Description: HTML Templates | Checkbox)
|
| upload=1 | If set, a file upload button is placed before the input field |
| default=x | default value for the input field |
The following settings are possible for data output:
| urlencode=1 | if set: URL-encode data |
| urldecode=1 | if set: URL-decode data |
| htmlentities=1 | if set: HTML-encode data |
| addslashes=1 | if set: adds a backslash (\) before \, ' and " |
| text2js=1 | if set: converts text into JavaScript-compatible text (replaces line breaks, quotation marks, etc.) |
Furthermore, the placeholder %convert-template-to-var% can be used to make all fields created in the template available as placeholders (name corresponds to "template_"+field name).
Using an HTML Template:
To use an HTML template, create the advertising material via Add Advertising Material - Advertising Material from Template - Select advertising material template from the list - Next.
In this example, the HTML template includes fields for image URL with upload button, image width, image height, headline, and the two text lines. Width/height was also taken from the template.
Note: If a template has been changed, you can update it to the latest version of the HTML template via the Update Template link. After saving the advertising material, this adjustment will be applied to the advertising material.
By clicking on (IDxx) you jump directly to the HTML templates, specifically to the template used in this advertising material.