Skip to main content

Template Repository

The Template Repository lets you control Template files and Advar templates using a Git version control system. Once this option is enabled, you can store your templates in your own version control system, maintain a detailed history of your changes, and effortlessly switch between different versions of your templates. Edit templates in your preferred IDE and only check out a branch in your Adhese account.

Changes in the checked-out version on your Adhese account will be applied to all creatives using the updated templates with the next publish.

Schermafdruk van 2024-10-28 09-44-54.png

Directory Structure

The main directory of your repository should contain all templates. Filename extensions are not obligatory, but we do recommend using .txt for readability. You can also add a directory called, for example, "advar_templates", which contains all the Advar template files and their description files (.descr). The name of the directory will be added to your Adhese configuration.

Advar Templates always consist of two files. When creating Advar templates, you should always include a second file with the same name but with a .descr extension. If you have a template called "advertorial.txt", the 2nd filename should be "advertorial.txt.descr". The second file contents are needed for rendering the UI Form through which users will fill out the actual creative.

Usage

The Template Repository screen shows two panels. On the left, you can see a summary of the Git commits currently used. It contains the Git hash, the branch, and the date and message when it was committed. On the right, you see a text field and button to change the commit for checkout:

  1. Enter branch name or Git hash to use (e.g. origin/master)
  2. Press Checkout button

The specified Git commit will be checked out. All the template changes will be applied in the next publish phase.

Activation

To activate this option, please get in touch with our Support department. You will also need to provide the following information:

  • the URL of your Git repository, this needs to be accessible from the outside (e.g. git@github.com:adhese/my_template_repo.git)

We will send you the public SSH key that you need to add to your Git configuration to allow us access to the repository you would like to use for managing your templates. If you use Github, add this as an SSH key to Your Repo > Settings > Deploy Keys.