# Advar Templates [![advar_templates1.png](https://documentation.adhese.org/uploads/images/gallery/2024-06/scaled-1680-/rLVrXscGrGu5lt0d-advar-templates1.png)](https://documentation.adhese.org/uploads/images/gallery/2024-06/rLVrXscGrGu5lt0d-advar-templates1.png) Adhese has introduced a new template format called *Advar*. Advar templates are pre-defined creatives to create sophisticated ads consisting of Javascript, CSS, custom JSON objects etc. The results of Advar templates are pre-made ads, such as a text ad including a small image. Advar templates can have multiple components (images, videos, texts and URLs) that form the final creative. The user provides these elements (or parameters) when they create a new Advar ad. The user responsible for adding a new creative to a campaign does not require coding knowledge in HTML, CSS or JavaScript. The template predefines the code and presents it as a form to the user. See [Add an Advar creative](https://documentation.adhese.org/books/campaign-management/page/creatives#bkmrk-add-an-advar-creativ). An Advar template always consists of two files: 1. The **creative's actual content** contains parameters that refer to the properties of an uploaded creative and its files. Besides any custom parameter defined by the creator of the Advar template, the creative content can also contain several fixed parameters. 2. A **descriptive file** generates the form that the user will see and use when uploading an Advar creative. The file contains a JSON object that defines the different elements available in the template. It will determine how to render the form to the user. As with templates, an Advar template can also contain a request element as a parameter. An Advar template can use all request properties as content. For example, the creative can display the visitor's name if the call to the ad server contains this parameter (and if the value of the name is available, of course). The *Advar templates* screen lists the name of the Advar template in the *Format column*. ### Create a new Advar template To create a new Advar template: 1. Go to the *Administration* screen. Click *Admin* in the left navigation menu. 2. Click *Advar templates*. The *Advar templates* screen opens: [![Schermafdruk van 2024-10-28 09-33-53.png](https://documentation.adhese.org/uploads/images/gallery/2024-10/scaled-1680-/GPXzVFfZSmpQN8za-schermafdruk-van-2024-10-28-09-33-53.png)](https://documentation.adhese.org/uploads/images/gallery/2024-10/GPXzVFfZSmpQN8za-schermafdruk-van-2024-10-28-09-33-53.png) 3. Click *Create an Advar template*. The *Create a new Advar template* screen opens: [![Schermafdruk van 2024-10-28 09-35-59.png](https://documentation.adhese.org/uploads/images/gallery/2024-10/scaled-1680-/goxF5l1kAjTZTxEn-schermafdruk-van-2024-10-28-09-35-59.png)](https://documentation.adhese.org/uploads/images/gallery/2024-10/goxF5l1kAjTZTxEn-schermafdruk-van-2024-10-28-09-35-59.png) 4. Enter a name in the **Name** field. Choose a clear and logical name, such as *pp-textad.txt*. 5. Insert the code in the **File contents** field. This code represents the actual content of the creative and includes parameters that refer to the properties of the uploaded creative and its files. Refer to the Appendix [Parameters for templates and Advar templates](https://documentation.adhese.org/books/integrations-and-delivery/page/parameters-for-templates-and-advar-templates) for an overview of the available parameters. Here is an example of some pieces of code: ```html

``` Add inline style attributes to an element to specify the design of the ad. 7. The **Example for creating new ads from this template** field contains the **descriptive file** and makes it possible to create input fields when using an Advar template file to upload an ad. These input fields become visible when you select an Advar template as a creative. The descriptive file contains a JSON object that defines the different elements available in the template. It will determine how to render the form to the user. It can contain three types of fields: 1. singleLineText, 2. multilineText, and 3. select (i.e. a list of options). Below is an example of the corresponding description file for the above Advar template, followed by a screenshot of the Advar form in the Adhese interface: ``` { "files": [{ "default": "", "doc": "This will be used as logo", "label": "A first image", "key": "2nd" },{ "default": "", "doc": "This will be used as background", "label": "A second image", "key": "3rd" }], "advar": "advar_example.txt", "fields": [{ "default": "", "doc": "Select the source of your article", "label": "Article source", "type": "select", "key": "", "options": [{ "value": "afp", "label": "AFP" },{ "value": "belga", "label": "Belga" },{ "value": "reuters", "label": "Reuters" }] },{ "default": "", "doc": "Fill in the title of your article", "label": "Title", "type": "singleLineText", "key": "" },{ "default": "", "doc": "Fill in the text of your article", "label": "Text", "type": "multilineText", "key": "" } ]} ``` [![create_a_new_advar_template3.png](https://documentation.adhese.org/uploads/images/gallery/2024-06/scaled-1680-/9y47BWXT8dAk2q2v-create-a-new-advar-template3.png)](https://documentation.adhese.org/uploads/images/gallery/2024-06/9y47BWXT8dAk2q2v-create-a-new-advar-template3.png) 8. Click the *Save* button. ### Edit an Advar template To edit an Advar template: 1. Go to the *Administration* screen. Click *Admin* in the left navigation menu. 2. Click *Advar templates*. 3. In the list of Advar templates, click the Advar template you want to modify. The *Edit template* screen opens: [![Schermafdruk van 2024-10-28 09-37-49.png](https://documentation.adhese.org/uploads/images/gallery/2024-10/scaled-1680-/tKelyzuwZLeioxWd-schermafdruk-van-2024-10-28-09-37-49.png)](https://documentation.adhese.org/uploads/images/gallery/2024-10/tKelyzuwZLeioxWd-schermafdruk-van-2024-10-28-09-37-49.png) 4. Change any of the Advar template's details. 5. Click *Save*.