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
- effortlessly switch between different versions of your templates
- edit templates in your preferred IDE
- check out a specific branch in your Adhese account.
Changes in the checked-out version on your Adhese account will be applied to all relevant creatives and will be pushed online with the next publish.
Directory Structure
The main directory of your repository can be used to store all 'regular' templates. In most implementations these are no longer used and can therefor be ignored. More relevant are the advar templates and the 'HTML5' advar templates. Both types will be stored in separate folders: "advar_templates" and "html5_templates".
Advar templates
More info about advar templates can be found here
Each advar template consists of 2 files:
- The file that contains the actual response template. This file can be made out of HTML, JSON or XML code. It will depend on the type of integration the template will be used for. The extension can be .txt or something that matches the content of the template.
- A description file that contains the form used to create an advar creative. This file will contain specific JSON markup. More info on this can be found here. The file needs to have the same name as the first file, followed by the extension .descr .
HTML5 templates
More info about HTML5 templates can be found here
HTML5 templates are stored as compressed folders using the .zip extension. Each HTML5 template has their own HTML, CSS and JS structure within that folder and need to have a description file named descr.json in the main directory.
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:
- Enter branch name or Git hash to use (e.g. origin/master)
- 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.
No Comments