Each template can consist of 4 files.
- [TEMPLATE_NAME].tmpl - Template file it describes the rendering rules, declares the template arguments, and defines its options. This file is the main one and its presence is mandatory, unlike other files.
- [TEMPLATE_NAME].wrapper.js - The file of the wrapper / action handler on the client.
- [TEMPLATE_NAME].hooks.js - The template hooks file. Contains functions for processing and preparing template arguments
- [TEMPLATE_NAME].receive.js - The file for processing requests by the wrapper on the server side. Replaces the REST API and allows you to encapsulate the functionality of the template
TEMPLATE_NAME - Name of the new template
SUPER_TEMPLATE - The path to the base template from which the new one will inherit. Optional parameter
In the attached documentation pages, you will learn more about the design of templates and their rendering.