To begin with the theory and definitions.
Templates – a site design files. There are two types of site templates that define the basic design and structure of the site, and module templates that make out the appearance of the modules.
Site template(s) – it's registration page (s) of the site to the user's part. This is the design of the entire site. All that visitors see the site: the logo, cap site, blocks, content area, basement. Default DIAFAN.CMS comes with a basic design pattern (looks like this demo version) and files are stored in the folder themes.
Modules templates – a design module files. They are located in modules/module_name/views/module_name.view.template_name.php. Module templates are responsible for the design of modular information in the website templates: news list, products, articles, goods cards, voting, etc. If the site templates make out the header, and the basement, which are the same everywhere. That module templates make out the contents.
Template functions – a function to display the content of modules in website templates. The template function is called template tag, which is the main tool for connecting to design DIAFAN.CMS. Template functions are divided into: